/*
//
//                  INTEL CORPORATION PROPRIETARY INFORMATION
//     This software is supplied under the terms of a license agreement or
//     nondisclosure agreement with Intel Corporation and may not be copied
//     or disclosed except in accordance with the terms of that agreement.
//          Copyright(c) 2004-2007 Intel Corporation. All Rights Reserved.
//
//     Intel Integrated Performance Primitives AAC Encode Sample for Windows*
//
//  By downloading and installing this sample, you hereby agree that the
//  accompanying Materials are being provided to you under the terms and
//  conditions of the End User License Agreement for the Intel Integrated
//  Performance Primitives product previously accepted by you. Please refer
//  to the file ippEULA.rtf or ippEULA.txt located in the root directory of your Intel IPP
//  product installation for more information.
//
//  MPEG-4 and AAC are international standards promoted by ISO, IEC, ITU, ETSI
//  and other organizations. Implementations of these standards, or the standard
//  enabled platforms may require licenses from various entities, including
//  Intel Corporation.
//
*/

#include "umc_defs.h"

#if defined (UMC_ENABLE_AAC_INT_AUDIO_ENCODER)

#include "aac_enc_psychoacoustic_int.h"

static Ipp32s psy_table_w_low_8000_long [] =
{ /* w_low */
    0,   9,  18,  27,  36,  45,  54,  63,  72,  81,  90, 99,  109, 119,
  129, 139, 149, 160, 171, 182, 193, 205, 217, 229, 242, 255, 269, 283,
  298, 313, 329, 346, 364, 382, 401, 421, 442, 465, 489, 515, 542, 571,
  602, 635, 671, 709, 750, 794, 842, 894, 950, 1010
};

static Ipp32s psy_table_w_low_11025_long [] =
{ /* w_low */
    0,   7,  14,  21,  28,  35,  42,  49,  56,  63,  70,  77,  84,  91,
   98, 106, 114, 122, 130, 138, 147, 156, 165, 174, 184, 194, 204, 215,
  226, 238, 250, 263, 276, 290, 305, 321, 338, 356, 375, 395, 416, 439,
  463, 489, 517, 547, 580, 615, 653, 694, 738, 786, 837, 892, 951, 1015
};

static Ipp32s psy_table_w_low_12000_long [] =
{ /* w_low */
    0,   6,  12,  18,  24,  30,  36,  42,  48,  54,  60,  66,  73,  80,
   87,  94, 101, 108, 115, 123, 131, 139, 147, 155, 164, 173, 182, 192,
  202, 213, 224, 236, 248, 261, 274, 288, 303, 319, 336, 354, 373, 393,
  415, 438, 463, 490, 519, 550, 584, 620, 659, 701, 746, 795, 848, 905,
  966
};

static Ipp32s psy_table_w_low_16000_long [] =
{ /* w_low */
    0,   5,  10,  15,  20,  25,  30,  35,  40,  45,  50,  55,  60,  65,
   70,  75,  81,  87,  93,  99, 105, 111, 117, 124, 131, 138, 145, 153,
  161, 169, 178, 187, 197, 207, 218, 229, 241, 254, 268, 283, 299, 316,
  334, 353, 374, 396, 420, 446, 474, 504, 537, 572, 610, 651, 695, 742,
  792, 846, 904, 966
};

static Ipp32s psy_table_w_low_22050_long [] =
{ /* w_low */
    0,   4,   8,  12,  16,  20,  24,  28,  32,  36,  40,  44,  48,  52,
   56,  60,  64,  68,  72,  77,  82,  87,  92,  97, 102, 108, 114, 120,
  126, 133, 140, 147, 155, 163, 172, 181, 191, 201, 212, 224, 237, 251,
  266, 282, 299, 318, 338, 360, 383, 408, 435, 464, 495, 528, 564, 602,
  643, 687, 734, 785, 840, 899, 963
};

static Ipp32s psy_table_w_low_24000_long [] =
{ /* w_low */
    0,   3,   6,   9,  12,  15,  18,  21,  24,  27,  30,  33,  37,  41,
   45,  49,  53,  57,  61,  65,  69,  73,  77,  82,  87,  92,  97, 102,
  108, 114, 120, 126, 133, 140, 147, 155, 163, 172, 181, 191, 202, 214,
  226, 239, 253, 268, 285, 303, 322, 343, 365, 389, 415, 443, 473, 505,
  539, 576, 615, 657, 702, 751, 804, 861, 923, 990
};

static Ipp32s psy_table_w_low_32000_long [] =
{ /* w_low */
    0,   3,   6,   9,  12,  15,  18,  21,  24,  27,  30,  33,  36,  39,
   42,  45,  48,  51,  54,  57,  61,  65,  69,  73,  77,  81,  85,  90,
   95, 100, 105, 111, 117, 123, 130, 137, 145, 153, 162, 172, 182, 193,
  205, 218, 232, 247, 263, 280, 299, 319, 341, 364, 389, 416, 445, 476,
  509, 544, 582, 623, 668, 716, 769, 827, 891, 962
};

static Ipp32s psy_table_w_low_44100_long [] =
{ /* w_low */
    0,   2,   4,   6,   8,  10,  12,  14,  16,  18,  20,  22,  24,  26,
   28,  30,  32,  34,  36,  39,  42,  45,  48,  51,  54,  57,  60,  63,
   67,  71,  75,  79,  83,  88,  93,  98, 104, 110, 117, 124, 132, 140,
  149, 158, 168, 179, 191, 204, 218, 233, 249, 266, 284, 304, 325, 348,
  372, 398, 426, 456, 489, 525, 564, 607, 654, 707, 766, 833, 909, 997
};

static Ipp32s psy_table_w_low_48000_long [] =
{ /* w_low */
    0,   2,   4,   6,   8,  10,  12,  14,  16,  18,  20,  22,  24,  26,
   28,  30,  32,  34,  36,  38,  41,  44,  47,  50,  53,  56,  59,  62,
   66,  70,  74,  78,  82,  87,  92,  97, 103, 109, 116, 123, 131, 139,
  148, 158, 168, 179, 191, 204, 218, 233, 249, 266, 284, 304, 325, 348,
  372, 398, 426, 457, 491, 528, 568, 613, 663, 719, 782, 854, 938
};

static Ipp32s psy_table_w_low_64000_long [] =
{ /* w_low */
    0,   2,   4,   6,   8,  10,  12,  14,  16,  18,  20,  22,  24,  26,
   28,  30,  32,  34,  36,  38,  40,  42,  45,  48,  51,  54,  57,  60,
   64,  68,  72,  76,  81,  86,  91,  97, 103, 110, 117, 125, 133, 142,
  152, 162, 173, 185, 198, 212, 227, 243, 260, 278, 298, 319, 342, 367,
  395, 425, 459, 496, 538, 585, 639, 702, 775, 862, 967
};

static Ipp32s psy_table_w_low_88200_long [] =
{ /* w_low */
    0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,
   14,  15,  16,  17,  18,  20,  22,  24,  26,  28,  30,  32,  34,  36,
   38,  40,  43,  46,  49,  52,  55,  59,  63,  67,  71,  76,  81,  86,
   92,  98, 105, 112, 120, 128, 137, 147, 157, 168, 180, 193, 207, 222,
  238, 256, 275, 296, 319, 345, 374, 406, 443, 485, 534, 592, 661, 746,
  852, 989
};

static Ipp32s psy_table_w_low_96000_long [] =
{ /* w_low */
    0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,
   14,  15,  16,  17,  18,  19,  21,  23,  25,  27,  29,  31,  33,  35,
   37,  39,  41,  44,  47,  50,  53,  56,  60,  64,  68,  73,  78,  83,
   89,  95, 102, 109, 117, 125, 134, 144, 154, 165, 177, 190, 204, 219,
  235, 253, 272, 293, 317, 343, 373, 407, 446, 491, 544, 608, 686, 784,
  911
};

static Ipp16s psy_table_width_8000_long[] =
{ /* width */
    9,   9,   9,   9,   9,   9,   9,   9,   9,   9,   9,  10,  10,  10,
   10,  10,  11,  11,  11,  11,  12,  12,  12,  13,  13,  14,  14,  15,
   15,  16,  17,  18,  18,  19,  20,  21,  23,  24,  26,  27,  29,  31,
   33,  36,  38,  41,  44,  48,  52,  56,  60,  14
};

static Ipp16s psy_table_width_11025_long[] =
{ /* width */
    7,   7,   7,   7,   7,   7,   7,   7,   7,   7,   7,   7,   7,   7,
    8,   8,   8,   8,   8,   9,   9,   9,   9,  10,  10,  10,  11,  11,
   12,  12,  13,  13,  14,  15,  16,  17,  18,  19,  20,  21,  23,  24,
   26,  28,  30,  33,  35,  38,  41,  44,  48,  51,  55,  59,  64,   9
};

static Ipp16s psy_table_width_12000_long[] =
{ /* width */
    6,   6,   6,   6,   6,   6,   6,   6,   6,   6,   6,   7,   7,   7,
    7,   7,   7,   7,   8,   8,   8,   8,   8,   9,   9,   9,  10,  10,
   11,  11,  12,  12,  13,  13,  14,  15,  16,  17,  18,  19,  20,  22,
   23,  25,  27,  29,  31,  34,  36,  39,  42,  45,  49,  53,  57,  61,
   58
};

static Ipp16s psy_table_width_16000_long[] =
{ /* width */
    5,   5,   5,   5,   5,   5,   5,   5,   5,   5,   5,   5,   5,   5,
    5,   6,   6,   6,   6,   6,   6,   6,   7,   7,   7,   7,   8,   8,
    8,   9,   9,  10,  10,  11,  11,  12,  13,  14,  15,  16,  17,  18,
   19,  21,  22,  24,  26,  28,  30,  33,  35,  38,  41,  44,  47,  50,
   54,  58,  62,  58
};

static Ipp16s psy_table_width_22050_long[] =
{ /* width */
    4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,
    4,   4,   4,   4,   5,   5,   5,   5,   5,   5,   6,   6,   6,   6,
    7,   7,   7,   8,   8,   9,   9,  10,  10,  11,  12,  13,  14,  15,
   16,  17,  19,  20,  22,  23,  25,  27,  29,  31,  33,  36,  38,  41,
   44,  47,  51,  55,  59,  64,  61
};

static Ipp16s psy_table_width_24000_long[] =
{ /* width */
    3,   3,   3,   3,   3,   3,   3,   3,   3,   3,   3,   4,   4,   4,
    4,   4,   4,   4,   4,   4,   4,   4,   5,   5,   5,   5,   5,   6,
    6,   6,   6,   7,   7,   7,   8,   8,   9,   9,  10,  11,  12,  12,
   13,  14,  15,  17,  18,  19,  21,  22,  24,  26,  28,  30,  32,  34,
   37,  39,  42,  45,  49,  53,  57,  62,  67,  34
};

static Ipp16s psy_table_width_32000_long[] =
{ /* width */
    3,   3,   3,   3,   3,   3,   3,   3,   3,   3,   3,   3,   3,   3,
    3,   3,   3,   3,   3,   4,   4,   4,   4,   4,   4,   4,   5,   5,
    5,   5,   6,   6,   6,   7,   7,   8,   8,   9,  10,  10,  11,  12,
   13,  14,  15,  16,  17,  19,  20,  22,  23,  25,  27,  29,  31,  33,
   35,  38,  41,  45,  48,  53,  58,  64,  71,  62
};

static Ipp16s psy_table_width_44100_long[] =
{ /* width */
    2,   2,   2,   2,   2,   2,   2,   2,   2,   2,   2,   2,   2,   2,
    2,   2,   2,   2,   3,   3,   3,   3,   3,   3,   3,   3,   3,   4,
    4,   4,   4,   4,   5,   5,   5,   6,   6,   7,   7,   8,   8,   9,
    9,  10,  11,  12,  13,  14,  15,  16,  17,  18,  20,  21,  23,  24,
   26,  28,  30,  33,  36,  39,  43,  47,  53,  59,  67,  76,  88,  27
};

static Ipp16s psy_table_width_48000_long[] =
{ /* width */
    2,   2,   2,   2,   2,   2,   2,   2,   2,   2,   2,   2,   2,   2,
    2,   2,   2,   2,   2,   3,   3,   3,   3,   3,   3,   3,   3,   4,
    4,   4,   4,   4,   5,   5,   5,   6,   6,   7,   7,   8,   8,   9,
   10,  10,  11,  12,  13,  14,  15,  16,  17,  18,  20,  21,  23,  24,
   26,  28,  31,  34,  37,  40,  45,  50,  56,  63,  72,  84,  86
};

static Ipp16s psy_table_width_64000_long[] =
{ /* width */
    2,   2,   2,   2,   2,   2,   2,   2,   2,   2,   2,   2,   2,   2,
    2,   2,   2,   2,   2,   2,   2,   3,   3,   3,   3,   3,   3,   4,
    4,   4,   4,   5,   5,   5,   6,   6,   7,   7,   8,   8,   9,  10,
   10,  11,  12,  13,  14,  15,  16,  17,  18,  20,  21,  23,  25,  28,
   30,  34,  37,  42,  47,  54,  63,  73,  87, 105,  57
};

static Ipp16s psy_table_width_88200_long[] =
{ /* width */
    1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,
    1,   1,   1,   1,   2,   2,   2,   2,   2,   2,   2,   2,   2,   2,
    2,   3,   3,   3,   3,   3,   4,   4,   4,   4,   5,   5,   5,   6,
    6,   7,   7,   8,   8,   9,  10,  10,  11,  12,  13,  14,  15,  16,
   18,  19,  21,  23,  26,  29,  32,  37,  42,  49,  58,  69,  85, 106,
  137,  35
};

static Ipp16s psy_table_width_96000_long[] =
{ /* width */
    1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,
    1,   1,   1,   1,   1,   2,   2,   2,   2,   2,   2,   2,   2,   2,
    2,   2,   3,   3,   3,   3,   3,   4,   4,   4,   5,   5,   5,   6,
    6,   7,   7,   8,   8,   9,  10,  10,  11,  12,  13,  14,  15,  16,
   18,  19,  21,  24,  26,  30,  34,  39,  45,  53,  64,  78,  98, 127,
  113
};

static Ipp16s psy_table_bval_8000_long [] =
{ /* bval Q10 */
    184,   543,   911,  1270,  1628,  1987,  2345,  2693,
   3052,  3389,  3738,  4086,  4454,  4823,  5171,  5519,
   5878,  6246,  6605,  6953,  7301,  7660,  8008,  8366,
   8714,  9062,  9421,  9769, 10117, 10465, 10813, 11172,
  11520, 11858, 12196, 12534, 12882, 13230, 13578, 13916,
  14264, 14602, 14950, 15288, 15636, 15974, 16312, 16650,
  16998, 17336, 17674, 17889
};

static Ipp16s psy_table_bval_11025_long [] =
{ /* bval Q10 */
    195,   584,   973,  1362,  1751,  2130,  2509,  2888,
   3256,  3625,  3983,  4342,  4700,  5038,  5407,  5786,
   6154,  6513,  6861,  7229,  7598,  7956,  8305,  8663,
   9032,  9380,  9728, 10086, 10435, 10793, 11141, 11489,
  11837, 12186, 12534, 12892, 13251, 13599, 13947, 14295,
  14633, 14981, 15319, 15657, 16005, 16343, 16691, 17029,
  17377, 17715, 18063, 18401, 18739, 19087, 19425, 19620
 };

static Ipp16s psy_table_bval_12000_long [] =
{ /* bval Q10 */
    184,   543,   911,  1270,  1628,  1987,  2345,  2693,
   3052,  3389,  3738,  4096,  4485,  4864,  5233,  5601,
   5960,  6298,  6666,  7045,  7414,  7762,  8110,  8468,
   8827,  9175,  9533,  9892, 10250, 10609, 10967, 11325,
  11684, 12032, 12380, 12728, 13076, 13425, 13783, 14131,
  14469, 14817, 15165, 15503, 15852, 16189, 16538, 16876,
  17224, 17562, 17900, 18237, 18575, 18924, 19261, 19610,
  19937
};

static Ipp16s psy_table_bval_16000_long [] =
{ /* bval Q10 */
    205,   604,  1014,  1413,  1812,  2212,  2601,  2990,
   3369,  3748,  4127,  4495,  4854,  5212,  5560,  5929,
   6328,  6717,  7086,  7455,  7813,  8151,  8509,  8888,
   9247,  9595,  9943, 10312, 10660, 11008, 11366, 11725,
  12083, 12431, 12780, 13128, 13476, 13834, 14193, 14551,
  14909, 15258, 15606, 15954, 16292, 16640, 16978, 17326,
  17664, 18012, 18360, 18698, 19046, 19395, 19732, 20070,
  20419, 20756, 21105, 21422
};

static Ipp16s psy_table_bval_22050_long [] =
{ /* bval Q10 */
    225,   666,  1116,  1556,  1997,  2427,  2857,  3287,
   3707,  4116,  4516,  4915,  5304,  5683,  6062,  6420,
   6779,  7117,  7496,  7895,  8294,  8663,  9032,  9380,
   9748, 10127, 10496, 10844, 11213, 11581, 11930, 12288,
  12646, 13005, 13363, 13722, 14070, 14408, 14756, 15114,
  15473, 15831, 16179, 16527, 16876, 17224, 17572, 17920,
  18268, 18606, 18954, 19292, 19630, 19978, 20316, 20654,
  20992, 21340, 21678, 22016, 22364, 22702, 23020
};

static Ipp16s psy_table_bval_24000_long [] =
{ /* bval Q10 */
    184,   543,   911,  1270,  1628,  1987,  2345,  2693,
   3052,  3389,  3738,  4127,  4567,  4997,  5417,  5827,
   6226,  6615,  6994,  7363,  7721,  8069,  8448,  8847,
   9236,  9605,  9964, 10332, 10721, 11090, 11448, 11807,
  12175, 12524, 12872, 13230, 13578, 13937, 14285, 14633,
  15002, 15360, 15698, 16036, 16384, 16732, 17091, 17428,
  17777, 18125, 18463, 18811, 19149, 19497, 19845, 20183,
  20521, 20869, 21207, 21545, 21883, 22221, 22569, 22907,
  23245, 23501
};

static Ipp16s psy_table_bval_32000_long [] =
{ /* bval Q10 */
    246,   727,  1208,  1690,  2171,  2642,  3103,  3564,
   4014,  4454,  4884,  5315,  5724,  6134,  6523,  6902,
   7270,  7629,  7987,  8376,  8806,  9216,  9615,  9994,
  10353, 10701, 11069, 11459, 11827, 12186, 12544, 12923,
  13271, 13629, 13988, 14346, 14705, 15063, 15432, 15790,
  16138, 16486, 16845, 17203, 17551, 17900, 18248, 18586,
  18934, 19292, 19630, 19978, 20326, 20675, 21023, 21371,
  21709, 22047, 22385, 22733, 23071, 23409, 23757, 24095,
  24433, 24576
};

static Ipp16s psy_table_bval_44100_long [] =
{ /* bval Q10 */
    225,   666,  1116,  1556,  1997,  2427,  2857,  3287,
   3707,  4116,  4516,  4915,  5304,  5683,  6062,  6420,
   6779,  7117,  7537,  8018,  8479,  8919,  9339,  9748,
  10127, 10496, 10844, 11233, 11653, 12052, 12421, 12780,
  13148, 13537, 13896, 14264, 14643, 15022, 15391, 15770,
  16138, 16497, 16845, 17193, 17541, 17900, 18258, 18616,
  18964, 19323, 19671, 20009, 20357, 20705, 21053, 21402,
  21750, 22088, 22436, 22774, 23122, 23460, 23808, 24146,
  24484, 24576, 24576, 24576, 24576, 24576
};

static Ipp16s psy_table_bval_48000_long [] =
{ /* bval Q10 */
    246,   727,  1208,  1690,  2171,  2642,  3103,  3564,
   4014,  4454,  4884,  5315,  5724,  6134,  6523,  6902,
   7270,  7629,  7987,  8397,  8888,  9349,  9779, 10199,
  10598, 10967, 11325, 11725, 12145, 12544, 12923, 13271,
  13640, 14029, 14387, 14756, 15124, 15493, 15862, 16230,
  16589, 16947, 17316, 17664, 18012, 18360, 18719, 19067,
  19415, 19763, 20111, 20449, 20797, 21146, 21494, 21842,
  22180, 22518, 22856, 23204, 23552, 23890, 24238, 24576,
  24576, 24576, 24576, 24576, 24576
};

static Ipp16s psy_table_bval_64000_long [] =
{ /* bval Q10 */
    328,   973,  1608,  2243,  2867,  3482,  4086,  4669,
   5243,  5796,  6328,  6840,  7332,  7813,  8264,  8704,
   9114,  9513,  9902, 10271, 10619, 11028, 11500, 11940,
  12349, 12739, 13097, 13496, 13916, 14305, 14664, 15043,
  15432, 15790, 16148, 16517, 16886, 17254, 17613, 17961,
  18309, 18668, 19026, 19364, 19712, 20070, 20419, 20777,
  21125, 21473, 21821, 22159, 22508, 22845, 23194, 23532,
  23880, 24228, 24566, 24576, 24576, 24576, 24576, 24576,
  24576, 24576, 24576
};

static Ipp16s psy_table_bval_88200_long [] =
{ /* bval Q10 */
      0,   451,   891,  1331,  1772,  2212,  2642,  3072,
   3492,  3912,  4321,  4721,  5110,  5499,  5878,  6246,
   6605,  6953,  7619,  8243,  8847,  9411,  9933, 10435,
  10906, 11346, 11756, 12145, 12513, 12943, 13414, 13855,
  14264, 14643, 15043, 15473, 15862, 16220, 16599, 16978,
  17326, 17684, 18043, 18401, 18760, 19118, 19476, 19814,
  20183, 20531, 20879, 21228, 21586, 21944, 22292, 22641,
  22989, 23347, 23685, 24033, 24381, 24576, 24576, 24576,
  24576, 24576, 24576, 24576, 24576, 24576, 24576, 24576
 };

static Ipp16s psy_table_bval_96000_long [] =
{ /* bval Q10 */
      0,   481,   973,  1454,  1925,  2406,  2877,  3338,
   3789,  4239,  4680,  5100,  5519,  5929,  6328,  6717,
   7096,  7455,  7813,  8479,  9114,  9708, 10260, 10783,
  11264, 11725, 12145, 12544, 12923, 13271, 13681, 14131,
  14551, 14940, 15299, 15688, 16087, 16466, 16845, 17234,
  17603, 17961, 18330, 18698, 19067, 19425, 19784, 20142,
  20511, 20869, 21217, 21576, 21934, 22292, 22651, 22999,
  23347, 23695, 24033, 24381, 24576, 24576, 24576, 24576,
  24576, 24576, 24576, 24576, 24576, 24576, 24576
};

static Ipp16s psy_table_qsthr_8000_long [] =
{ /* qsthr Q8 */
  11986, 11986, 11986, 10706, 10706, 10706,  9938,  9938,
   9938,  8658,  8658,  8776,  8264,  8264,  8264,  8264,
   8369,  8369,  8369,  8369,  8466,  8466,  8466,  8556,
   8556,  8637,  8637,  8714,  8714,  8786,  8852,  8916,
   8916,  8975,  9034,  9088,  9188,  9236,  9326,  9367,
   9446,  9521,  9590,  9687,  9746,  9830,  9910, 10007,
  10097, 10179, 10255,  8637
};

static Ipp16s psy_table_qsthr_11025_long [] =
{ /* qsthr Q8 */
  11707, 11707, 11707, 10427, 10427,  9659,  9659,  9659,
   8379,  8379,  8379,  7867,  7867,  7867,  8015,  8015,
   8015,  8015,  8015,  8146,  8146,  8146,  8146,  8264,
   8264,  8264,  8369,  8369,  8466,  8466,  8556,  8556,
   8637,  8714,  8786,  8852,  8916,  8975,  9034,  9088,
   9188,  9236,  9326,  9408,  9485,  9590,  9656,  9746,
   9830,  9910, 10007, 10074, 10158, 10235, 10327,  8146
 };

static Ipp16s psy_table_qsthr_12000_long [] =
{ /* qsthr Q8 */
  11535, 11535, 11535, 10255, 10255, 10255,  9487,  9487,
   9487,  8207,  8207,  7867,  7867,  7867,  7867,  7867,
   7867,  7867,  8015,  8015,  8015,  8015,  8015,  8146,
   8146,  8146,  8264,  8264,  8369,  8369,  8466,  8466,
   8556,  8556,  8637,  8714,  8786,  8852,  8916,  8975,
   9034,  9139,  9188,  9283,  9367,  9446,  9521,  9623,
   9687,  9777,  9859,  9935, 10030, 10117, 10196, 10273,
  10217
};

static Ipp16s psy_table_qsthr_16000_long [] =
{ /* qsthr Q8 */
  11085, 11034,  9805,  9754,  9728,  8986,  9037,  7680,
   7680,  7245,  7245,  7245,  7245,  7245,  7245,  7245,
   7245,  7168,  7493,  7493,  7493,  7493,  7493,  7439,
   7695,  7695,  7695,  7867,  7867,  7867,  8015,  8015,
   8146,  8146,  8264,  8264,  8369,  8369,  8466,  8566,
   8658,  8735,  8812,  8878,  8998,  9042,  9147,  9193,
   9324,  9408,  9500,  9559,  9633,  9759,  9772, 10629,
  10711, 10785, 11369, 11487
};

static Ipp16s psy_table_qsthr_22050_long [] =
{ /* qsthr Q8 */
  11085, 11085,  9805,  9805,  9805,  9037,  9037,  7757,
   7757,  7245,  7245,  7245,  7245,  7245,  7245,  7245,
   7245,  7245,  7493,  7493,  7493,  7493,  7493,  7493,
   7695,  7695,  7695,  7695,  7867,  7867,  7867,  8015,
   8015,  8146,  8146,  8264,  8264,  8369,  8466,  8556,
   8637,  8714,  8786,  8852,  8975,  9034,  9139,  9188,
   9283,  9367,  9446,  9521,  9590,  9687,  9746, 10598,
  10678, 10752, 11354, 11438, 11515, 12887, 12833
};

static Ipp16s psy_table_qsthr_24000_long [] =
{ /* qsthr Q8 */
  10765, 10765, 10765,  9485,  9485,  9485,  8717,  8717,
   8717,  7437,  7437,  7245,  7245,  7245,  7245,  7245,
   7245,  7245,  7245,  7245,  7245,  7245,  7493,  7493,
   7493,  7493,  7493,  7695,  7695,  7695,  7695,  7867,
   7867,  7867,  8015,  8015,  8146,  8146,  8264,  8369,
   8466,  8466,  8556,  8637,  8714,  8852,  8916,  8975,
   9088,  9139,  9236,  9326,  9408,  9485,  9556,  9623,
  10486, 10545, 10627, 11215, 11310, 11397, 12756, 12851,
  12938, 12183
};

static Ipp16s psy_table_qsthr_32000_long [] =
{ /* qsthr Q8 */
  10765, 10765,  9485,  9485,  8717,  8717,  7437,  7437,
   7437,  6925,  6925,  6925,  6925,  6925,  6925,  6925,
   6925,  6925,  6925,  7245,  7245,  7245,  7245,  7245,
   7245,  7245,  7493,  7493,  7493,  7493,  7695,  7695,
   7695,  7867,  7867,  8015,  8015,  8146,  8264,  8264,
   8369,  8466,  8556,  8637,  8714,  8786,  8852,  8975,
   9034,  9139,  9188,  9283,  9367, 10214, 10289, 10358,
  10936, 11026, 11110, 12495, 12567, 12677, 15337, 15447,
  15562, 16868
};

static Ipp16s psy_table_qsthr_44100_long [] =
{ /* qsthr Q8 */
  10314, 10314,  9034,  9034,  9034,  8266,  8266,  6986,
   6986,  6474,  6474,  6474,  6474,  6474,  6474,  6474,
   6474,  6474,  6925,  6925,  6925,  6925,  6925,  6925,
   6925,  6925,  6925,  7245,  7245,  7245,  7245,  7245,
   7493,  7493,  7493,  7695,  7695,  7867,  7867,  8015,
   8015,  8146,  8146,  8264,  8369,  8466,  8556,  8637,
   8714,  8786,  8852,  8916,  9034,  9856,  9956, 10004,
  10606, 10688, 10765, 12150, 12247, 12337, 15004, 15104,
  15237, 17915, 18058, 18196, 18360, 18455
};

static Ipp16s psy_table_qsthr_48000_long [] =
{ /* qsthr Q8 */
  10314, 10314,  9034,  9034,  8266,  8266,  6986,  6986,
   6986,  6474,  6474,  6474,  6474,  6474,  6474,  6474,
   6474,  6474,  6474,  6925,  6925,  6925,  6925,  6925,
   6925,  6925,  6925,  7245,  7245,  7245,  7245,  7245,
   7493,  7493,  7493,  7695,  7695,  7867,  7867,  8015,
   8015,  8146,  8264,  8264,  8369,  8466,  8556,  8637,
   8714,  8786,  8852,  8916,  9802,  9856,  9956, 10516,
  10606, 10688, 12081, 12183, 12278, 14925, 15055, 17733,
  17859, 17989, 18138, 18309, 17971
};

static Ipp16s psy_table_qsthr_64000_long [] =
{ /* qsthr Q8 */
  10314, 10314,  9034,  8266,  8266,  6986,  6986,  6474,
   6474,  6474,  6474,  6474,  6474,  6474,  6474,  6474,
   6474,  6474,  6474,  6474,  6474,  6925,  6925,  6925,
   6925,  6925,  6925,  7245,  7245,  7245,  7245,  7493,
   7493,  7493,  7695,  7695,  7867,  7867,  8015,  8015,
   8146,  8264,  8264,  8369,  8466,  8556,  8637,  9482,
   9554,  9620, 10196, 10314, 10368, 11748, 11843, 11968,
  14605, 14743, 14838, 17539, 17664, 17818, 17989, 18153,
  18348, 18557, 17876
};

static Ipp16s psy_table_qsthr_88200_long [] =
{ /* qsthr Q8 */
   9544,  9544,  9544,  8264,  8264,  7496,  7496,  6216,
   6216,  6216,  5704,  5704,  5704,  5704,  5704,  5704,
   5704,  5704,  6474,  6474,  6474,  6474,  6474,  6474,
   6474,  6474,  6474,  6474,  6474,  6925,  6925,  6925,
   6925,  6925,  7245,  7245,  7245,  7245,  7493,  7493,
   7493,  7695,  7695,  7867,  7867,  8015,  8015,  8146,
   8264,  9032,  9137,  9234,  9836,  9917,  9994, 11346,
  11476, 11535, 14208, 14308, 14446, 17126, 17236, 17398,
  17539, 17710, 17897, 18089, 18322, 18568, 18852, 17336
 };

static Ipp16s psy_table_qsthr_96000_long [] =
{ /* qsthr Q8 */
   9544,  9544,  9544,  8264,  8264,  7496,  7496,  6216,
   6216,  5704,  5704,  5704,  5704,  5704,  5704,  5704,
   5704,  5704,  5704,  6474,  6474,  6474,  6474,  6474,
   6474,  6474,  6474,  6474,  6474,  6474,  6925,  6925,
   6925,  6925,  6925,  7245,  7245,  7245,  7493,  7493,
   7493,  7695,  7695,  7867,  7867,  8015,  8015,  8146,
   9032,  9032,  9137,  9746,  9836,  9917, 11274, 11346,
  11476, 14095, 14208, 14356, 17006, 17165, 17303, 17457,
  17615, 17797, 18007, 18227, 18481, 18767, 18639
};

static Ipp32s psy_table_w_low_8000_short[] =
{ /* w_low */
    0,   2,   4,   6,   8,  10,  12,  14,  16,  18,  20,  22,  24,  26,
   28,  30,  32,  34,  36,  38,  40,  42,  45,  48,  51,  54,  57,  60,
   64,  68,  72,  76,  81,  86,  91,  97, 103, 110, 117, 125
};

static Ipp32s psy_table_w_low_11025_short[] =
{ /* w_low */
    0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,
   14,  15,  16,  17,  18,  20,  22,  24,  26,  28,  30,  32,  34,  36,
   38,  40,  43,  46,  49,  52,  55,  59,  63,  67,  71,  76,  81,  86,
   92,  98, 105, 112, 120
};

static Ipp32s psy_table_w_low_12000_short[] =
{ /* w_low */
    0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,
   14,  15,  16,  17,  18,  19,  21,  23,  25,  27,  29,  31,  33,  35,
   37,  39,  41,  44,  47,  50,  53,  56,  60,  64,  68,  73,  78,  83,
   89,  95, 102, 109, 117, 125
};

static Ipp32s psy_table_w_low_16000_short[] =
{ /* w_low */
    0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,
   14,  15,  16,  17,  18,  19,  20,  21,  23,  25,  27,  29,  31,  33,
   35,  37,  40,  43,  46,  49,  52,  56,  60,  64,  69,  74,  79,  85,
   91,  98, 105, 113, 121
};

static Ipp32s psy_table_w_low_22050_short[] =
{ /* w_low */
    0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,
   14,  15,  16,  17,  18,  19,  20,  22,  24,  26,  28,  30,  32,  34,
   36,  39,  42,  45,  48,  52,  56,  60,  64,  69,  74,  79,  85,  91,
   98, 105, 113, 121
};

static Ipp32s psy_table_w_low_24000_short[] =
{ /* w_low */
    0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,
   14,  15,  16,  17,  18,  19,  20,  22,  24,  26,  28,  30,  32,  34,
   37,  40,  43,  46,  49,  53,  57,  61,  66,  71,  76,  82,  88,  95,
  102, 110, 118, 127
};

static Ipp32s psy_table_w_low_32000_short[] =
{ /* w_low */
    0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,
   14,  15,  16,  17,  18,  19,  21,  23,  25,  27,  29,  31,  33,  36,
   39,  42,  45,  49,  53,  57,  61,  66,  71,  76,  82,  88,  95, 103,
  111, 120
};

static Ipp32s psy_table_w_low_44100_short[] =
{ /* w_low */
    0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,
   14,  15,  16,  17,  18,  20,  22,  24,  26,  28,  30,  32,  35,  38,
   41,  44,  48,  52,  56,  60,  65,  70,  76,  82,  89,  97, 106, 116
};

static Ipp32s psy_table_w_low_48000_short[] =
{ /* w_low */
    0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,
   14,  15,  16,  17,  19,  21,  23,  25,  27,  29,  31,  34,  37,  40,
   43,  46,  50,  54,  58,  63,  68,  74,  80,  87,  95, 104, 114, 126
};

static Ipp32s psy_table_w_low_64000_short[] =
{ /* w_low */
    0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,
   14,  15,  16,  18,  20,  22,  24,  26,  28,  30,  33,  36,  39,  42,
   46,  50,  54,  59,  64,  70,  77,  85,  94, 105, 118
};

static Ipp32s psy_table_w_low_88200_short[] =
{ /* w_low */
    0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,
   14,  15,  16,  18,  20,  22,  24,  26,  28,  30,  33,  36,  39,  43,
   47,  52,  57,  63,  70,  78,  88, 100, 116
};

static Ipp32s psy_table_w_low_96000_short[] =
{ /* w_low */
    0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,
   14,  15,  17,  19,  21,  23,  25,  27,  29,  32,  35,  38,  42,  46,
   51,  56,  62,  69,  78,  89, 103, 121
};

static Ipp16s psy_table_width_8000_short[] =
{ /* width */
    2,   2,   2,   2,   2,   2,   2,   2,   2,   2,   2,   2,   2,   2,
    2,   2,   2,   2,   2,   2,   2,   3,   3,   3,   3,   3,   3,   4,
    4,   4,   4,   5,   5,   5,   6,   6,   7,   7,   8,   3
};

static Ipp16s psy_table_width_11025_short[] =
{ /* width */
    1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,
    1,   1,   1,   1,   2,   2,   2,   2,   2,   2,   2,   2,   2,   2,
    2,   3,   3,   3,   3,   3,   4,   4,   4,   4,   5,   5,   5,   6,
    6,   7,   7,   8,   8
};

static Ipp16s psy_table_width_12000_short[] =
{ /* width */
    1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,
    1,   1,   1,   1,   1,   2,   2,   2,   2,   2,   2,   2,   2,   2,
    2,   2,   3,   3,   3,   3,   3,   4,   4,   4,   5,   5,   5,   6,
    6,   7,   7,   8,   8,   3
};

static Ipp16s psy_table_width_16000_short[] =
{ /* width */
    1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,
    1,   1,   1,   1,   1,   1,   1,   2,   2,   2,   2,   2,   2,   2,
    2,   3,   3,   3,   3,   3,   4,   4,   4,   5,   5,   5,   6,   6,
    7,   7,   8,   8,   7
};

static Ipp16s psy_table_width_22050_short[] =
{ /* width */
    1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,
    1,   1,   1,   1,   1,   1,   2,   2,   2,   2,   2,   2,   2,   2,
    3,   3,   3,   3,   4,   4,   4,   4,   5,   5,   5,   6,   6,   7,
    7,   8,   8,   7
};

static Ipp16s psy_table_width_24000_short[] =
{ /* width */
    1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,
    1,   1,   1,   1,   1,   1,   2,   2,   2,   2,   2,   2,   2,   3,
    3,   3,   3,   3,   4,   4,   4,   5,   5,   5,   6,   6,   7,   7,
    8,   8,   9,   1
};

static Ipp16s psy_table_width_32000_short[] =
{ /* width */
    1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,
    1,   1,   1,   1,   1,   2,   2,   2,   2,   2,   2,   2,   3,   3,
    3,   3,   4,   4,   4,   4,   5,   5,   5,   6,   6,   7,   8,   8,
    9,   8
};

static Ipp16s psy_table_width_44100_short[] =
{ /* width */
    1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,
    1,   1,   1,   1,   2,   2,   2,   2,   2,   2,   2,   3,   3,   3,
    3,   4,   4,   4,   4,   5,   5,   6,   6,   7,   8,   9,  10,  12
};

static Ipp16s psy_table_width_48000_short[] =
{ /* width */
    1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,
    1,   1,   1,   2,   2,   2,   2,   2,   2,   2,   3,   3,   3,   3,
    3,   4,   4,   4,   5,   5,   6,   6,   7,   8,   9,  10,  12,   2
};

static Ipp16s psy_table_width_64000_short[] =
{ /* width */
    1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,
    1,   1,   2,   2,   2,   2,   2,   2,   2,   3,   3,   3,   3,   4,
    4,   4,   5,   5,   6,   7,   8,   9,  11,  13,  10,   0,   1,   1,
    1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,
    2,   2,   2,   2,   2,   2,   2,   3,   3,   3,   4,   4,   5,   5,
    6,   7,   8,  10,  12,  16,  12
};

static Ipp16s psy_table_width_88200_short[] =
{ /* width */
    1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,
    1,   1,   2,   2,   2,   2,   2,   2,   2,   3,   3,   3,   4,   4,
    5,   5,   6,   7,   8,  10,  12,  16,  12
};

static Ipp16s psy_table_width_96000_short[] =
{ /* width */
    1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,
    1,   2,   2,   2,   2,   2,   2,   2,   3,   3,   3,   4,   4,   5,
    5,   6,   7,   9,  11,  14,  18,   7
};

static Ipp16s psy_table_bval_8000_short [] =
{ /* bval Q10 */
    328,   973,  1608,  2243,  2867,  3482,  4086,  4669,
   5243,  5796,  6328,  6840,  7332,  7813,  8264,  8704,
   9114,  9513,  9902, 10271, 10619, 11028, 11500, 11940,
  12349, 12739, 13097, 13496, 13916, 14305, 14664, 15043,
  15432, 15790, 16148, 16517, 16886, 17254, 17613, 17859
 };

static Ipp16s psy_table_bval_11025_short [] =
{ /* bval Q10 */
      0,   451,   891,  1331,  1772,  2212,  2642,  3072,
   3492,  3912,  4321,  4721,  5110,  5499,  5878,  6246,
   6605,  6953,  7619,  8243,  8847,  9411,  9933, 10435,
  10906, 11346, 11756, 12145, 12513, 12943, 13414, 13855,
  14264, 14643, 15043, 15473, 15862, 16220, 16599, 16978,
  17326, 17684, 18043, 18401, 18760, 19118, 19476
};

static Ipp16s psy_table_bval_12000_short [] =
{ /* bval Q10 */
      0,   481,   973,  1454,  1925,  2406,  2877,  3338,
   3789,  4239,  4680,  5100,  5519,  5929,  6328,  6717,
   7096,  7455,  7813,  8479,  9114,  9708, 10260, 10783,
  11264, 11725, 12145, 12544, 12923, 13271, 13681, 14131,
  14551, 14940, 15299, 15688, 16087, 16466, 16845, 17234,
  17603, 17961, 18330, 18698, 19067, 19425, 19784, 20019
 };

static Ipp16s psy_table_bval_16000_short [] =
{ /* bval Q10 */
      0,   645,  1290,  1925,  2560,  3185,  3789,  4383,
   4966,  5519,  6062,  6584,  7096,  7578,  8038,  8489,
   8909,  9318,  9718, 10086, 10445, 11110, 11715, 12278,
  12800, 13271, 13711, 14111, 14490, 14920, 15391, 15821,
  16220, 16579, 16968, 17377, 17746, 18135, 18524, 18883,
  19251, 19630, 19999, 20367, 20736, 21105, 21422
};

static Ipp16s psy_table_bval_22050_short [] =
{ /* bval Q10 */
      0,   891,  1772,  2642,  3492,  4321,  5110,  5878,
   6605,  7291,  7936,  8561,  9134,  9677, 10199, 10680,
  11131, 11561, 11960, 12339, 13015, 13640, 14193, 14694,
  15155, 15575, 15954, 16312, 16712, 17152, 17562, 17930,
  18319, 18739, 19118, 19476, 19835, 20214, 20572, 20931,
  21289, 21658, 22016, 22374, 22733, 23030
};

static Ipp16s psy_table_bval_24000_short [] =
{ /* bval Q10 */
      0,   973,  1925,  2877,  3789,  4680,  5519,  6328,
   7096,  7813,  8489,  9124,  9718, 10271, 10783, 11274,
  11725, 12155, 12554, 12923, 13599, 14203, 14746, 15237,
  15688, 16087, 16466, 16886, 17347, 17766, 18156, 18504,
  18883, 19282, 19661, 20040, 20439, 20797, 21166, 21545,
  21924, 22292, 22661, 23020, 23368, 23562
};

static Ipp16s psy_table_bval_32000_short [] =
{ /* bval Q10 */
      0,  1290,  2560,  3789,  4966,  6062,  7096,  8038,
   8909,  9718, 10445, 11110, 11725, 12288, 12800, 13271,
  13711, 14111, 14490, 15155, 15749, 16271, 16753, 17172,
  17562, 17920, 18330, 18780, 19190, 19569, 19968, 20398,
  20787, 21146, 21524, 21914, 22272, 22630, 22989, 23347,
  23716, 24074, 24422, 24576
};

static Ipp16s psy_table_bval_44100_short [] =
{ /* bval Q10 */
      0,  1772,  3492,  5110,  6605,  7936,  9134, 10199,
  11131, 11960, 12687, 13343, 13937, 14459, 14940, 15370,
  15770, 16138, 16783, 17357, 17869, 18319, 18739, 19118,
  19476, 19876, 20326, 20736, 21115, 21514, 21944, 22333,
  22682, 23050, 23419, 23788, 24156, 24504, 24576, 24576,
  24576, 24576
};

static Ipp16s psy_table_bval_48000_short [] =
{ /* bval Q10 */
      0,  1925,  3789,  5519,  7096,  8489,  9718, 10783,
  11725, 12554, 13271, 13916, 14490, 15002, 15473, 15892,
  16282, 16957, 17562, 18084, 18565, 18985, 19384, 19743,
  20163, 20623, 21033, 21422, 21780, 22159, 22559, 22927,
  23306, 23685, 24054, 24422, 24576, 24576, 24576, 24576,
  24576, 24576
};

static Ipp16s psy_table_bval_64000_short [] =
{ /* bval Q10 */
      0,  2560,  4966,  7096,  8909, 10445, 11725, 12800,
  13711, 14490, 15165, 15759, 16282, 16753, 17183, 17572,
  18248, 18842, 19374, 19855, 20296, 20695, 21064, 21484,
  21944, 22364, 22753, 23153, 23572, 23951, 24320, 24576,
  24576, 24576, 24576, 24576, 24576, 24576, 24576
};

static Ipp16s psy_table_bval_88200_short [] =
{ /* bval Q10 */
      0,  3492,  6605,  9134, 11131, 12687, 13937, 14940,
  15770, 16476, 17091, 17623, 18104, 18545, 18934, 19302,
  19948, 20531, 21043, 21514, 21944, 22333, 22682, 23091,
  23532, 23921, 24320, 24576, 24576, 24576, 24576, 24576,
  24576, 24576, 24576, 24576, 24576
};

static Ipp16s psy_table_bval_96000_short [] =
{ /* bval Q10 */
      0,  3789,  7096,  9718, 11725, 13271, 14490, 15473,
  16282, 16968, 17572, 18094, 18565, 18995, 19384, 20070,
  20685, 21228, 21719, 22159, 22559, 22927, 23337, 23788,
  24187, 24576, 24576, 24576, 24576, 24576, 24576, 24576,
  24576, 24576, 24576, 24576
};

static Ipp16s psy_table_qsthr_8000_short [] =
{ /* qsthr Q9 */
  15508, 15508, 12948, 11412, 11412,  8852,  8852,  7828,
   7828,  7828,  7828,  7828,  7828,  7828,  7828,  7828,
   7828,  7828,  7828,  7828,  7828,  8730,  8730,  8730,
   8730,  8730,  8730,  9370,  9370,  9370,  9370,  9866,
   9866,  9866, 10271, 10271, 10614, 10614, 10911,  8730
 };

static Ipp16s psy_table_qsthr_11025_short [] =
{ /* qsthr Q9 */
  13967, 13967, 13967, 11407, 11407,  9871,  9871,  7311,
   7311,  7311,  6287,  6287,  6287,  6287,  6287,  6287,
   6287,  6287,  7828,  7828,  7828,  7828,  7828,  7828,
   7828,  7828,  7828,  7828,  7828,  8730,  8730,  8730,
   8730,  8730,  9370,  9370,  9370,  9370,  9866,  9866,
   9866, 10271, 10271, 10614, 10614, 10911, 10911
};

static Ipp16s psy_table_qsthr_12000_short [] =
{ /* qsthr Q9 */
  13967, 13967, 13967, 11407, 11407,  9871,  9871,  7311,
   7311,  6287,  6287,  6287,  6287,  6287,  6287,  6287,
   6287,  6287,  6287,  7828,  7828,  7828,  7828,  7828,
   7828,  7828,  7828,  7828,  7828,  7828,  8730,  8730,
   8730,  8730,  8730,  9370,  9370,  9370,  9866,  9866,
   9866, 10271, 10271, 10614, 10614, 10911, 10911,  8730
 };

static Ipp16s psy_table_qsthr_16000_short [] =
{ /* qsthr Q9 */
  13967, 13967, 11407, 11407,  9871,  7311,  7311,  6287,
   6287,  6287,  6287,  6287,  6287,  6287,  6287,  6287,
   6287,  6287,  6287,  6287,  6287,  7828,  7828,  7828,
   7828,  7828,  7828,  7828,  7828,  8730,  8730,  8730,
   8730,  8730,  9370,  9370,  9370,  9866,  9866,  9866,
  10271, 10271, 10614, 10614, 12447, 12447, 12150
};

static Ipp16s psy_table_qsthr_22050_short [] =
{ /* qsthr Q9 */
  13967, 13967, 11407,  9871,  7311,  6287,  6287,  6287,
   6287,  6287,  6287,  6287,  6287,  6287,  6287,  6287,
   6287,  6287,  6287,  6287,  7828,  7828,  7828,  7828,
   7828,  7828,  7828,  7828,  8730,  8730,  8730,  8730,
   9370,  9370,  9370,  9370,  9866,  9866, 11402, 11807,
  11807, 13174, 13174, 13471, 16031, 15734
};

static Ipp16s psy_table_qsthr_24000_short [] =
{ /* qsthr Q9 */
  13967, 13967, 11407,  9871,  7311,  6287,  6287,  6287,
   6287,  6287,  6287,  6287,  6287,  6287,  6287,  6287,
   6287,  6287,  6287,  6287,  7828,  7828,  7828,  7828,
   7828,  7828,  7828,  8730,  8730,  8730,  8730,  8730,
   9370,  9370,  9370,  9866,  9866, 11402, 11807, 12831,
  13174, 13174, 16031, 16031, 16292, 16527
};

static Ipp16s psy_table_qsthr_32000_short [] =
{ /* qsthr Q9 */
  13967, 11407,  9871,  7311,  6287,  6287,  6287,  6287,
   6287,  6287,  6287,  6287,  6287,  6287,  6287,  6287,
   6287,  6287,  6287,  7828,  7828,  7828,  7828,  7828,
   7828,  7828,  8730,  8730,  8730,  8730,  9370,  9370,
  10906, 10906, 12426, 12426, 12426, 15391, 15391, 15734,
  21151, 21151, 21412, 30961
};

static Ipp16s psy_table_qsthr_44100_short [] =
{ /* qsthr Q9 */
  13967, 11407,  7311,  6287,  6287,  6287,  6287,  6287,
   6287,  6287,  6287,  6287,  6287,  6287,  6287,  6287,
   6287,  6287,  7828,  7828,  7828,  7828,  7828,  7828,
   7828,  8730,  8730, 10266, 10266, 11930, 11930, 11930,
  14490, 14986, 14986, 20511, 20511, 20854, 26271, 26532,
  26767, 27172
};

static Ipp16s psy_table_qsthr_48000_short [] =
{ /* qsthr Q9 */
  13967, 11407,  7311,  6287,  6287,  6287,  6287,  6287,
   6287,  6287,  6287,  6287,  6287,  6287,  6287,  6287,
   6287,  7828,  7828,  7828,  7828,  7828,  7828,  7828,
   8730, 10266, 10266, 10266, 11290, 11930, 14490, 14490,
  14986, 20106, 20511, 20511, 25789, 26271, 26532, 26767,
  27172, 27172
};

static Ipp16s psy_table_qsthr_64000_short [] =
{ /* qsthr Q9 */
  13967,  9871,  6287,  6287,  6287,  6287,  6287,  6287,
   6287,  6287,  6287,  6287,  6287,  6287,  6287,  6287,
   7828,  7828,  7828,  7828,  7828,  9364,  9364, 10266,
  11290, 11290, 13850, 14490, 19610, 19610, 20106, 25226,
  25631, 25974, 26271, 26532, 26977, 27351, 26767
};

static Ipp16s psy_table_qsthr_88200_short [] =
{ /* qsthr Q9 */
  13967,  7311,  6287,  6287,  6287,  6287,  6287,  6287,
   6287,  6287,  6287,  6287,  6287,  6287,  6287,  6287,
   7828,  9364,  9364, 10388, 10388, 10388, 12948, 13850,
  13850, 18970, 19610, 24730, 25226, 25226, 25631, 25974,
  26271, 26767, 27172, 27812, 27172
};

static Ipp16s psy_table_qsthr_96000_short [] =
{ /* qsthr Q9 */
  13967,  7311,  6287,  6287,  6287,  6287,  6287,  6287,
   6287,  6287,  6287,  6287,  6287,  6287,  6287,  7828,
   9364,  9364, 10388, 10388, 12948, 12948, 13850, 18970,
  18970, 24730, 24730, 25226, 25226, 25631, 25974, 26532,
  26977, 27515, 28073, 25974
};

sPsyPartitionTable aacienc_psy_partition_tables_long[] =
{
  {96000, 71, psy_table_w_low_96000_long, psy_table_width_96000_long,
              psy_table_bval_44100_long,  psy_table_qsthr_96000_long},  /* 96000 */
  {88200, 72, psy_table_w_low_88200_long, psy_table_width_88200_long,
              psy_table_bval_88200_long,  psy_table_qsthr_88200_long},  /* 88200 */
  {64000, 67, psy_table_w_low_64000_long, psy_table_width_64000_long,
              psy_table_bval_64000_long,  psy_table_qsthr_64000_long},  /* 64000 */
  {48000, 69, psy_table_w_low_48000_long, psy_table_width_48000_long,
              psy_table_bval_48000_long,  psy_table_qsthr_48000_long},  /* 48000 */
  {44100, 70, psy_table_w_low_44100_long, psy_table_width_44100_long,
              psy_table_bval_44100_long,  psy_table_qsthr_44100_long},  /* 44100 */
  {32000, 66, psy_table_w_low_32000_long, psy_table_width_32000_long,
              psy_table_bval_32000_long,  psy_table_qsthr_32000_long},  /* 32000 */
  {24000, 66, psy_table_w_low_24000_long, psy_table_width_24000_long,
              psy_table_bval_24000_long,  psy_table_qsthr_24000_long},  /* 24000 */
  {22050, 63, psy_table_w_low_22050_long, psy_table_width_22050_long,
              psy_table_bval_22050_long,  psy_table_qsthr_22050_long},  /* 22050 */
  {16000, 60, psy_table_w_low_16000_long, psy_table_width_16000_long,
              psy_table_bval_16000_long,  psy_table_qsthr_16000_long},  /* 16000 */
  {12000, 57, psy_table_w_low_12000_long, psy_table_width_12000_long,
              psy_table_bval_12000_long,  psy_table_qsthr_12000_long},  /* 12000 */
  {11025, 56, psy_table_w_low_11025_long, psy_table_width_11025_long,
              psy_table_bval_11025_long,  psy_table_qsthr_11025_long},  /* 11025 */
  { 8000, 52, psy_table_w_low_8000_long,  psy_table_width_8000_long,
              psy_table_bval_8000_long,   psy_table_qsthr_8000_long},   /* 8000  */
};

sPsyPartitionTable aacienc_psy_partition_tables_short[] =
{
  {96000, 36, psy_table_w_low_96000_short, psy_table_width_96000_short,
              psy_table_bval_44100_short,  psy_table_qsthr_96000_short},  /* 96000 */
  {88200, 37, psy_table_w_low_88200_short, psy_table_width_88200_short,
              psy_table_bval_88200_short,  psy_table_qsthr_88200_short},  /* 88200 */
  {64000, 39, psy_table_w_low_64000_short, psy_table_width_64000_short,
              psy_table_bval_64000_short,  psy_table_qsthr_64000_short},  /* 64000 */
  {48000, 42, psy_table_w_low_48000_short, psy_table_width_48000_short,
              psy_table_bval_48000_short,  psy_table_qsthr_48000_short},  /* 48000 */
  {44100, 42, psy_table_w_low_44100_short, psy_table_width_44100_short,
              psy_table_bval_44100_short,  psy_table_qsthr_44100_short},  /* 44100 */
  {32000, 44, psy_table_w_low_32000_short, psy_table_width_32000_short,
              psy_table_bval_32000_short,  psy_table_qsthr_32000_short},  /* 32000 */
  {24000, 46, psy_table_w_low_24000_short, psy_table_width_24000_short,
              psy_table_bval_24000_short,  psy_table_qsthr_24000_short},  /* 24000 */
  {22050, 46, psy_table_w_low_22050_short, psy_table_width_22050_short,
              psy_table_bval_22050_short,  psy_table_qsthr_22050_short},  /* 22050 */
  {16000, 47, psy_table_w_low_16000_short, psy_table_width_16000_short,
              psy_table_bval_16000_short,  psy_table_qsthr_16000_short},  /* 16000 */
  {12000, 48, psy_table_w_low_12000_short, psy_table_width_12000_short,
              psy_table_bval_12000_short,  psy_table_qsthr_12000_short},  /* 12000 */
  {11025, 47, psy_table_w_low_11025_short, psy_table_width_11025_short,
              psy_table_bval_11025_short,  psy_table_qsthr_11025_short},  /* 11025 */
  { 8000, 40, psy_table_w_low_8000_short,  psy_table_width_8000_short,
              psy_table_bval_8000_short,   psy_table_qsthr_8000_short},   /* 8000  */
};

Ipp16s AACI_HANN_long[] = { /* Q15 */
  0x0000, 0x0000, 0x0000, 0x0001, 0x0002, 0x0002, 0x0003, 0x0004,
  0x0006, 0x0007, 0x0008, 0x000a, 0x000c, 0x000e, 0x0010, 0x0013,
  0x0015, 0x0018, 0x001a, 0x001d, 0x0020, 0x0024, 0x0027, 0x002b,
  0x002e, 0x0032, 0x0036, 0x003a, 0x003f, 0x0043, 0x0048, 0x004c,
  0x0051, 0x0056, 0x005c, 0x0061, 0x0067, 0x006c, 0x0072, 0x0078,
  0x007e, 0x0085, 0x008b, 0x0092, 0x0098, 0x009f, 0x00a6, 0x00ae,
  0x00b5, 0x00bd, 0x00c4, 0x00cc, 0x00d4, 0x00dc, 0x00e4, 0x00ed,
  0x00f6, 0x00fe, 0x0107, 0x0110, 0x0119, 0x0123, 0x012c, 0x0136,
  0x0140, 0x014a, 0x0154, 0x015e, 0x0168, 0x0173, 0x017e, 0x0189,
  0x0194, 0x019f, 0x01aa, 0x01b6, 0x01c1, 0x01cd, 0x01d9, 0x01e5,
  0x01f1, 0x01fd, 0x020a, 0x0217, 0x0223, 0x0230, 0x023e, 0x024b,
  0x0258, 0x0266, 0x0273, 0x0281, 0x028f, 0x029d, 0x02ac, 0x02ba,
  0x02c9, 0x02d8, 0x02e6, 0x02f5, 0x0305, 0x0314, 0x0323, 0x0333,
  0x0343, 0x0353, 0x0363, 0x0373, 0x0383, 0x0394, 0x03a4, 0x03b5,
  0x03c6, 0x03d7, 0x03e8, 0x03fa, 0x040b, 0x041d, 0x042f, 0x0441,
  0x0453, 0x0465, 0x0477, 0x048a, 0x049d, 0x04af, 0x04c2, 0x04d6,
  0x04e9, 0x04fc, 0x0510, 0x0523, 0x0537, 0x054b, 0x055f, 0x0573,
  0x0588, 0x059c, 0x05b1, 0x05c6, 0x05db, 0x05f0, 0x0605, 0x061a,
  0x0630, 0x0645, 0x065b, 0x0671, 0x0687, 0x069d, 0x06b4, 0x06ca,
  0x06e1, 0x06f7, 0x070e, 0x0725, 0x073c, 0x0754, 0x076b, 0x0783,
  0x079a, 0x07b2, 0x07ca, 0x07e2, 0x07fb, 0x0813, 0x082b, 0x0844,
  0x085d, 0x0876, 0x088f, 0x08a8, 0x08c1, 0x08db, 0x08f4, 0x090e,
  0x0928, 0x0942, 0x095c, 0x0976, 0x0991, 0x09ab, 0x09c6, 0x09e0,
  0x09fb, 0x0a16, 0x0a31, 0x0a4d, 0x0a68, 0x0a84, 0x0a9f, 0x0abb,
  0x0ad7, 0x0af3, 0x0b0f, 0x0b2c, 0x0b48, 0x0b65, 0x0b81, 0x0b9e,
  0x0bbb, 0x0bd8, 0x0bf5, 0x0c13, 0x0c30, 0x0c4e, 0x0c6b, 0x0c89,
  0x0ca7, 0x0cc5, 0x0ce3, 0x0d02, 0x0d20, 0x0d3f, 0x0d5d, 0x0d7c,
  0x0d9b, 0x0dba, 0x0dd9, 0x0df9, 0x0e18, 0x0e38, 0x0e57, 0x0e77,
  0x0e97, 0x0eb7, 0x0ed7, 0x0ef7, 0x0f18, 0x0f38, 0x0f59, 0x0f79,
  0x0f9a, 0x0fbb, 0x0fdc, 0x0ffd, 0x101f, 0x1040, 0x1062, 0x1083,
  0x10a5, 0x10c7, 0x10e9, 0x110b, 0x112d, 0x1150, 0x1172, 0x1194,
  0x11b7, 0x11da, 0x11fd, 0x1220, 0x1243, 0x1266, 0x1289, 0x12ad,
  0x12d0, 0x12f4, 0x1318, 0x133c, 0x1360, 0x1384, 0x13a8, 0x13cc,
  0x13f1, 0x1415, 0x143a, 0x145e, 0x1483, 0x14a8, 0x14cd, 0x14f2,
  0x1518, 0x153d, 0x1562, 0x1588, 0x15ae, 0x15d3, 0x15f9, 0x161f,
  0x1645, 0x166b, 0x1692, 0x16b8, 0x16df, 0x1705, 0x172c, 0x1753,
  0x1779, 0x17a0, 0x17c7, 0x17ef, 0x1816, 0x183d, 0x1865, 0x188c,
  0x18b4, 0x18db, 0x1903, 0x192b, 0x1953, 0x197b, 0x19a3, 0x19cc,
  0x19f4, 0x1a1d, 0x1a45, 0x1a6e, 0x1a96, 0x1abf, 0x1ae8, 0x1b11,
  0x1b3a, 0x1b63, 0x1b8d, 0x1bb6, 0x1be0, 0x1c09, 0x1c33, 0x1c5c,
  0x1c86, 0x1cb0, 0x1cda, 0x1d04, 0x1d2e, 0x1d58, 0x1d83, 0x1dad,
  0x1dd8, 0x1e02, 0x1e2d, 0x1e57, 0x1e82, 0x1ead, 0x1ed8, 0x1f03,
  0x1f2e, 0x1f59, 0x1f85, 0x1fb0, 0x1fdc, 0x2007, 0x2033, 0x205e,
  0x208a, 0x20b6, 0x20e2, 0x210e, 0x213a, 0x2166, 0x2192, 0x21be,
  0x21eb, 0x2217, 0x2243, 0x2270, 0x229d, 0x22c9, 0x22f6, 0x2323,
  0x2350, 0x237d, 0x23aa, 0x23d7, 0x2404, 0x2431, 0x245f, 0x248c,
  0x24b9, 0x24e7, 0x2514, 0x2542, 0x2570, 0x259e, 0x25cb, 0x25f9,
  0x2627, 0x2655, 0x2683, 0x26b1, 0x26e0, 0x270e, 0x273c, 0x276b,
  0x2799, 0x27c8, 0x27f6, 0x2825, 0x2853, 0x2882, 0x28b1, 0x28e0,
  0x290f, 0x293e, 0x296d, 0x299c, 0x29cb, 0x29fa, 0x2a29, 0x2a58,
  0x2a88, 0x2ab7, 0x2ae7, 0x2b16, 0x2b46, 0x2b75, 0x2ba5, 0x2bd4,
  0x2c04, 0x2c34, 0x2c64, 0x2c94, 0x2cc4, 0x2cf4, 0x2d24, 0x2d54,
  0x2d84, 0x2db4, 0x2de4, 0x2e14, 0x2e45, 0x2e75, 0x2ea5, 0x2ed6,
  0x2f06, 0x2f37, 0x2f67, 0x2f98, 0x2fc8, 0x2ff9, 0x302a, 0x305a,
  0x308b, 0x30bc, 0x30ed, 0x311e, 0x314e, 0x317f, 0x31b0, 0x31e1,
  0x3212, 0x3243, 0x3275, 0x32a6, 0x32d7, 0x3308, 0x3339, 0x336b,
  0x339c, 0x33cd, 0x33ff, 0x3430, 0x3461, 0x3493, 0x34c4, 0x34f6,
  0x3527, 0x3559, 0x358a, 0x35bc, 0x35ee, 0x361f, 0x3651, 0x3683,
  0x36b4, 0x36e6, 0x3718, 0x374a, 0x377c, 0x37ad, 0x37df, 0x3811,
  0x3843, 0x3875, 0x38a7, 0x38d9, 0x390b, 0x393d, 0x396f, 0x39a1,
  0x39d3, 0x3a05, 0x3a37, 0x3a69, 0x3a9b, 0x3acd, 0x3aff, 0x3b31,
  0x3b63, 0x3b95, 0x3bc8, 0x3bfa, 0x3c2c, 0x3c5e, 0x3c90, 0x3cc2,
  0x3cf5, 0x3d27, 0x3d59, 0x3d8b, 0x3dbe, 0x3df0, 0x3e22, 0x3e54,
  0x3e87, 0x3eb9, 0x3eeb, 0x3f1d, 0x3f50, 0x3f82, 0x3fb4, 0x3fe6,
  0x4019, 0x404b, 0x407d, 0x40af, 0x40e2, 0x4114, 0x4146, 0x4178,
  0x41ab, 0x41dd, 0x420f, 0x4241, 0x4274, 0x42a6, 0x42d8, 0x430a,
  0x433d, 0x436f, 0x43a1, 0x43d3, 0x4405, 0x4437, 0x446a, 0x449c,
  0x44ce, 0x4500, 0x4532, 0x4564, 0x4596, 0x45c8, 0x45fa, 0x462c,
  0x465e, 0x4690, 0x46c2, 0x46f4, 0x4726, 0x4758, 0x478a, 0x47bc,
  0x47ee, 0x4820, 0x4852, 0x4883, 0x48b5, 0x48e7, 0x4919, 0x494b,
  0x497c, 0x49ae, 0x49e0, 0x4a11, 0x4a43, 0x4a75, 0x4aa6, 0x4ad8,
  0x4b09, 0x4b3b, 0x4b6c, 0x4b9e, 0x4bcf, 0x4c00, 0x4c32, 0x4c63,
  0x4c94, 0x4cc6, 0x4cf7, 0x4d28, 0x4d59, 0x4d8a, 0x4dbc, 0x4ded,
  0x4e1e, 0x4e4f, 0x4e80, 0x4eb1, 0x4ee1, 0x4f12, 0x4f43, 0x4f74,
  0x4fa5, 0x4fd5, 0x5006, 0x5037, 0x5067, 0x5098, 0x50c8, 0x50f9,
  0x5129, 0x515a, 0x518a, 0x51ba, 0x51eb, 0x521b, 0x524b, 0x527b,
  0x52ab, 0x52db, 0x530b, 0x533b, 0x536b, 0x539b, 0x53cb, 0x53fb,
  0x542b, 0x545a, 0x548a, 0x54b9, 0x54e9, 0x5518, 0x5548, 0x5577,
  0x55a7, 0x55d6, 0x5605, 0x5634, 0x5663, 0x5692, 0x56c1, 0x56f0,
  0x571f, 0x574e, 0x577d, 0x57ac, 0x57da, 0x5809, 0x5837, 0x5866,
  0x5894, 0x58c3, 0x58f1, 0x591f, 0x594e, 0x597c, 0x59aa, 0x59d8,
  0x5a06, 0x5a34, 0x5a61, 0x5a8f, 0x5abd, 0x5aeb, 0x5b18, 0x5b46,
  0x5b73, 0x5ba0, 0x5bce, 0x5bfb, 0x5c28, 0x5c55, 0x5c82, 0x5caf,
  0x5cdc, 0x5d09, 0x5d36, 0x5d62, 0x5d8f, 0x5dbc, 0x5de8, 0x5e14,
  0x5e41, 0x5e6d, 0x5e99, 0x5ec5, 0x5ef1, 0x5f1d, 0x5f49, 0x5f75,
  0x5fa1, 0x5fcc, 0x5ff8, 0x6023, 0x604f, 0x607a, 0x60a6, 0x60d1,
  0x60fc, 0x6127, 0x6152, 0x617d, 0x61a8, 0x61d2, 0x61fd, 0x6227,
  0x6252, 0x627c, 0x62a7, 0x62d1, 0x62fb, 0x6325, 0x634f, 0x6379,
  0x63a3, 0x63cc, 0x63f6, 0x641f, 0x6449, 0x6472, 0x649c, 0x64c5,
  0x64ee, 0x6517, 0x6540, 0x6569, 0x6591, 0x65ba, 0x65e2, 0x660b,
  0x6633, 0x665c, 0x6684, 0x66ac, 0x66d4, 0x66fc, 0x6724, 0x674b,
  0x6773, 0x679a, 0x67c2, 0x67e9, 0x6810, 0x6838, 0x685f, 0x6886,
  0x68ac, 0x68d3, 0x68fa, 0x6920, 0x6947, 0x696d, 0x6994, 0x69ba,
  0x69e0, 0x6a06, 0x6a2c, 0x6a51, 0x6a77, 0x6a9d, 0x6ac2, 0x6ae7,
  0x6b0d, 0x6b32, 0x6b57, 0x6b7c, 0x6ba1, 0x6bc5, 0x6bea, 0x6c0e,
  0x6c33, 0x6c57, 0x6c7b, 0x6c9f, 0x6cc3, 0x6ce7, 0x6d0b, 0x6d2f,
  0x6d52, 0x6d76, 0x6d99, 0x6dbc, 0x6ddf, 0x6e02, 0x6e25, 0x6e48,
  0x6e6b, 0x6e8d, 0x6eaf, 0x6ed2, 0x6ef4, 0x6f16, 0x6f38, 0x6f5a,
  0x6f7c, 0x6f9d, 0x6fbf, 0x6fe0, 0x7002, 0x7023, 0x7044, 0x7065,
  0x7086, 0x70a6, 0x70c7, 0x70e7, 0x7108, 0x7128, 0x7148, 0x7168,
  0x7188, 0x71a8, 0x71c7, 0x71e7, 0x7206, 0x7226, 0x7245, 0x7264,
  0x7283, 0x72a2, 0x72c0, 0x72df, 0x72fd, 0x731c, 0x733a, 0x7358,
  0x7376, 0x7394, 0x73b1, 0x73cf, 0x73ec, 0x740a, 0x7427, 0x7444,
  0x7461, 0x747e, 0x749a, 0x74b7, 0x74d3, 0x74f0, 0x750c, 0x7528,
  0x7544, 0x7560, 0x757b, 0x7597, 0x75b2, 0x75ce, 0x75e9, 0x7604,
  0x761f, 0x7639, 0x7654, 0x766e, 0x7689, 0x76a3, 0x76bd, 0x76d7,
  0x76f1, 0x770b, 0x7724, 0x773e, 0x7757, 0x7770, 0x7789, 0x77a2,
  0x77bb, 0x77d4, 0x77ec, 0x7804, 0x781d, 0x7835, 0x784d, 0x7865,
  0x787c, 0x7894, 0x78ab, 0x78c3, 0x78da, 0x78f1, 0x7908, 0x791e,
  0x7935, 0x794b, 0x7962, 0x7978, 0x798e, 0x79a4, 0x79ba, 0x79cf,
  0x79e5, 0x79fa, 0x7a0f, 0x7a24, 0x7a39, 0x7a4e, 0x7a63, 0x7a77,
  0x7a8c, 0x7aa0, 0x7ab4, 0x7ac8, 0x7adc, 0x7aef, 0x7b03, 0x7b16,
  0x7b29, 0x7b3d, 0x7b50, 0x7b62, 0x7b75, 0x7b88, 0x7b9a, 0x7bac,
  0x7bbe, 0x7bd0, 0x7be2, 0x7bf4, 0x7c05, 0x7c17, 0x7c28, 0x7c39,
  0x7c4a, 0x7c5b, 0x7c6b, 0x7c7c, 0x7c8c, 0x7c9c, 0x7cac, 0x7cbc,
  0x7ccc, 0x7cdc, 0x7ceb, 0x7cfa, 0x7d0a, 0x7d19, 0x7d27, 0x7d36,
  0x7d45, 0x7d53, 0x7d62, 0x7d70, 0x7d7e, 0x7d8c, 0x7d99, 0x7da7,
  0x7db4, 0x7dc1, 0x7dcf, 0x7ddc, 0x7de8, 0x7df5, 0x7e02, 0x7e0e,
  0x7e1a, 0x7e26, 0x7e32, 0x7e3e, 0x7e49, 0x7e55, 0x7e60, 0x7e6b,
  0x7e76, 0x7e81, 0x7e8c, 0x7e97, 0x7ea1, 0x7eab, 0x7eb5, 0x7ebf,
  0x7ec9, 0x7ed3, 0x7edc, 0x7ee6, 0x7eef, 0x7ef8, 0x7f01, 0x7f09,
  0x7f12, 0x7f1b, 0x7f23, 0x7f2b, 0x7f33, 0x7f3b, 0x7f42, 0x7f4a,
  0x7f51, 0x7f59, 0x7f60, 0x7f67, 0x7f6d, 0x7f74, 0x7f7a, 0x7f81,
  0x7f87, 0x7f8d, 0x7f93, 0x7f98, 0x7f9e, 0x7fa3, 0x7fa9, 0x7fae,
  0x7fb3, 0x7fb7, 0x7fbc, 0x7fc0, 0x7fc5, 0x7fc9, 0x7fcd, 0x7fd1,
  0x7fd4, 0x7fd8, 0x7fdb, 0x7fdf, 0x7fe2, 0x7fe5, 0x7fe7, 0x7fea,
  0x7fec, 0x7fef, 0x7ff1, 0x7ff3, 0x7ff5, 0x7ff7, 0x7ff8, 0x7ff9,
  0x7ffb, 0x7ffc, 0x7ffd, 0x7ffd, 0x7ffe, 0x7fff, 0x7fff, 0x7fff,
  0x7fff, 0x7fff, 0x7fff, 0x7ffe, 0x7ffd, 0x7ffd, 0x7ffc, 0x7ffb,
  0x7ff9, 0x7ff8, 0x7ff7, 0x7ff5, 0x7ff3, 0x7ff1, 0x7fef, 0x7fec,
  0x7fea, 0x7fe7, 0x7fe5, 0x7fe2, 0x7fdf, 0x7fdb, 0x7fd8, 0x7fd4,
  0x7fd1, 0x7fcd, 0x7fc9, 0x7fc5, 0x7fc0, 0x7fbc, 0x7fb7, 0x7fb3,
  0x7fae, 0x7fa9, 0x7fa3, 0x7f9e, 0x7f98, 0x7f93, 0x7f8d, 0x7f87,
  0x7f81, 0x7f7a, 0x7f74, 0x7f6d, 0x7f67, 0x7f60, 0x7f59, 0x7f51,
  0x7f4a, 0x7f42, 0x7f3b, 0x7f33, 0x7f2b, 0x7f23, 0x7f1b, 0x7f12,
  0x7f09, 0x7f01, 0x7ef8, 0x7eef, 0x7ee6, 0x7edc, 0x7ed3, 0x7ec9,
  0x7ebf, 0x7eb5, 0x7eab, 0x7ea1, 0x7e97, 0x7e8c, 0x7e81, 0x7e76,
  0x7e6b, 0x7e60, 0x7e55, 0x7e49, 0x7e3e, 0x7e32, 0x7e26, 0x7e1a,
  0x7e0e, 0x7e02, 0x7df5, 0x7de8, 0x7ddc, 0x7dcf, 0x7dc1, 0x7db4,
  0x7da7, 0x7d99, 0x7d8c, 0x7d7e, 0x7d70, 0x7d62, 0x7d53, 0x7d45,
  0x7d36, 0x7d27, 0x7d19, 0x7d0a, 0x7cfa, 0x7ceb, 0x7cdc, 0x7ccc,
  0x7cbc, 0x7cac, 0x7c9c, 0x7c8c, 0x7c7c, 0x7c6b, 0x7c5b, 0x7c4a,
  0x7c39, 0x7c28, 0x7c17, 0x7c05, 0x7bf4, 0x7be2, 0x7bd0, 0x7bbe,
  0x7bac, 0x7b9a, 0x7b88, 0x7b75, 0x7b62, 0x7b50, 0x7b3d, 0x7b29,
  0x7b16, 0x7b03, 0x7aef, 0x7adc, 0x7ac8, 0x7ab4, 0x7aa0, 0x7a8c,
  0x7a77, 0x7a63, 0x7a4e, 0x7a39, 0x7a24, 0x7a0f, 0x79fa, 0x79e5,
  0x79cf, 0x79ba, 0x79a4, 0x798e, 0x7978, 0x7962, 0x794b, 0x7935,
  0x791e, 0x7908, 0x78f1, 0x78da, 0x78c3, 0x78ab, 0x7894, 0x787c,
  0x7865, 0x784d, 0x7835, 0x781d, 0x7804, 0x77ec, 0x77d4, 0x77bb,
  0x77a2, 0x7789, 0x7770, 0x7757, 0x773e, 0x7724, 0x770b, 0x76f1,
  0x76d7, 0x76bd, 0x76a3, 0x7689, 0x766e, 0x7654, 0x7639, 0x761f,
  0x7604, 0x75e9, 0x75ce, 0x75b2, 0x7597, 0x757b, 0x7560, 0x7544,
  0x7528, 0x750c, 0x74f0, 0x74d3, 0x74b7, 0x749a, 0x747e, 0x7461,
  0x7444, 0x7427, 0x740a, 0x73ec, 0x73cf, 0x73b1, 0x7394, 0x7376,
  0x7358, 0x733a, 0x731c, 0x72fd, 0x72df, 0x72c0, 0x72a2, 0x7283,
  0x7264, 0x7245, 0x7226, 0x7206, 0x71e7, 0x71c7, 0x71a8, 0x7188,
  0x7168, 0x7148, 0x7128, 0x7108, 0x70e7, 0x70c7, 0x70a6, 0x7086,
  0x7065, 0x7044, 0x7023, 0x7002, 0x6fe0, 0x6fbf, 0x6f9d, 0x6f7c,
  0x6f5a, 0x6f38, 0x6f16, 0x6ef4, 0x6ed2, 0x6eaf, 0x6e8d, 0x6e6b,
  0x6e48, 0x6e25, 0x6e02, 0x6ddf, 0x6dbc, 0x6d99, 0x6d76, 0x6d52,
  0x6d2f, 0x6d0b, 0x6ce7, 0x6cc3, 0x6c9f, 0x6c7b, 0x6c57, 0x6c33,
  0x6c0e, 0x6bea, 0x6bc5, 0x6ba1, 0x6b7c, 0x6b57, 0x6b32, 0x6b0d,
  0x6ae7, 0x6ac2, 0x6a9d, 0x6a77, 0x6a51, 0x6a2c, 0x6a06, 0x69e0,
  0x69ba, 0x6994, 0x696d, 0x6947, 0x6920, 0x68fa, 0x68d3, 0x68ac,
  0x6886, 0x685f, 0x6838, 0x6810, 0x67e9, 0x67c2, 0x679a, 0x6773,
  0x674b, 0x6724, 0x66fc, 0x66d4, 0x66ac, 0x6684, 0x665c, 0x6633,
  0x660b, 0x65e2, 0x65ba, 0x6591, 0x6569, 0x6540, 0x6517, 0x64ee,
  0x64c5, 0x649c, 0x6472, 0x6449, 0x641f, 0x63f6, 0x63cc, 0x63a3,
  0x6379, 0x634f, 0x6325, 0x62fb, 0x62d1, 0x62a7, 0x627c, 0x6252,
  0x6227, 0x61fd, 0x61d2, 0x61a8, 0x617d, 0x6152, 0x6127, 0x60fc,
  0x60d1, 0x60a6, 0x607a, 0x604f, 0x6023, 0x5ff8, 0x5fcc, 0x5fa1,
  0x5f75, 0x5f49, 0x5f1d, 0x5ef1, 0x5ec5, 0x5e99, 0x5e6d, 0x5e41,
  0x5e14, 0x5de8, 0x5dbc, 0x5d8f, 0x5d62, 0x5d36, 0x5d09, 0x5cdc,
  0x5caf, 0x5c82, 0x5c55, 0x5c28, 0x5bfb, 0x5bce, 0x5ba0, 0x5b73,
  0x5b46, 0x5b18, 0x5aeb, 0x5abd, 0x5a8f, 0x5a61, 0x5a34, 0x5a06,
  0x59d8, 0x59aa, 0x597c, 0x594e, 0x591f, 0x58f1, 0x58c3, 0x5894,
  0x5866, 0x5837, 0x5809, 0x57da, 0x57ac, 0x577d, 0x574e, 0x571f,
  0x56f0, 0x56c1, 0x5692, 0x5663, 0x5634, 0x5605, 0x55d6, 0x55a7,
  0x5577, 0x5548, 0x5518, 0x54e9, 0x54b9, 0x548a, 0x545a, 0x542b,
  0x53fb, 0x53cb, 0x539b, 0x536b, 0x533b, 0x530b, 0x52db, 0x52ab,
  0x527b, 0x524b, 0x521b, 0x51eb, 0x51ba, 0x518a, 0x515a, 0x5129,
  0x50f9, 0x50c8, 0x5098, 0x5067, 0x5037, 0x5006, 0x4fd5, 0x4fa5,
  0x4f74, 0x4f43, 0x4f12, 0x4ee1, 0x4eb1, 0x4e80, 0x4e4f, 0x4e1e,
  0x4ded, 0x4dbc, 0x4d8a, 0x4d59, 0x4d28, 0x4cf7, 0x4cc6, 0x4c94,
  0x4c63, 0x4c32, 0x4c00, 0x4bcf, 0x4b9e, 0x4b6c, 0x4b3b, 0x4b09,
  0x4ad8, 0x4aa6, 0x4a75, 0x4a43, 0x4a11, 0x49e0, 0x49ae, 0x497c,
  0x494b, 0x4919, 0x48e7, 0x48b5, 0x4883, 0x4852, 0x4820, 0x47ee,
  0x47bc, 0x478a, 0x4758, 0x4726, 0x46f4, 0x46c2, 0x4690, 0x465e,
  0x462c, 0x45fa, 0x45c8, 0x4596, 0x4564, 0x4532, 0x4500, 0x44ce,
  0x449c, 0x446a, 0x4437, 0x4405, 0x43d3, 0x43a1, 0x436f, 0x433d,
  0x430a, 0x42d8, 0x42a6, 0x4274, 0x4241, 0x420f, 0x41dd, 0x41ab,
  0x4178, 0x4146, 0x4114, 0x40e2, 0x40af, 0x407d, 0x404b, 0x4019,
  0x3fe6, 0x3fb4, 0x3f82, 0x3f50, 0x3f1d, 0x3eeb, 0x3eb9, 0x3e87,
  0x3e54, 0x3e22, 0x3df0, 0x3dbe, 0x3d8b, 0x3d59, 0x3d27, 0x3cf5,
  0x3cc2, 0x3c90, 0x3c5e, 0x3c2c, 0x3bfa, 0x3bc8, 0x3b95, 0x3b63,
  0x3b31, 0x3aff, 0x3acd, 0x3a9b, 0x3a69, 0x3a37, 0x3a05, 0x39d3,
  0x39a1, 0x396f, 0x393d, 0x390b, 0x38d9, 0x38a7, 0x3875, 0x3843,
  0x3811, 0x37df, 0x37ad, 0x377c, 0x374a, 0x3718, 0x36e6, 0x36b4,
  0x3683, 0x3651, 0x361f, 0x35ee, 0x35bc, 0x358a, 0x3559, 0x3527,
  0x34f6, 0x34c4, 0x3493, 0x3461, 0x3430, 0x33ff, 0x33cd, 0x339c,
  0x336b, 0x3339, 0x3308, 0x32d7, 0x32a6, 0x3275, 0x3243, 0x3212,
  0x31e1, 0x31b0, 0x317f, 0x314e, 0x311e, 0x30ed, 0x30bc, 0x308b,
  0x305a, 0x302a, 0x2ff9, 0x2fc8, 0x2f98, 0x2f67, 0x2f37, 0x2f06,
  0x2ed6, 0x2ea5, 0x2e75, 0x2e45, 0x2e14, 0x2de4, 0x2db4, 0x2d84,
  0x2d54, 0x2d24, 0x2cf4, 0x2cc4, 0x2c94, 0x2c64, 0x2c34, 0x2c04,
  0x2bd4, 0x2ba5, 0x2b75, 0x2b46, 0x2b16, 0x2ae7, 0x2ab7, 0x2a88,
  0x2a58, 0x2a29, 0x29fa, 0x29cb, 0x299c, 0x296d, 0x293e, 0x290f,
  0x28e0, 0x28b1, 0x2882, 0x2853, 0x2825, 0x27f6, 0x27c8, 0x2799,
  0x276b, 0x273c, 0x270e, 0x26e0, 0x26b1, 0x2683, 0x2655, 0x2627,
  0x25f9, 0x25cb, 0x259e, 0x2570, 0x2542, 0x2514, 0x24e7, 0x24b9,
  0x248c, 0x245f, 0x2431, 0x2404, 0x23d7, 0x23aa, 0x237d, 0x2350,
  0x2323, 0x22f6, 0x22c9, 0x229d, 0x2270, 0x2243, 0x2217, 0x21eb,
  0x21be, 0x2192, 0x2166, 0x213a, 0x210e, 0x20e2, 0x20b6, 0x208a,
  0x205e, 0x2033, 0x2007, 0x1fdc, 0x1fb0, 0x1f85, 0x1f59, 0x1f2e,
  0x1f03, 0x1ed8, 0x1ead, 0x1e82, 0x1e57, 0x1e2d, 0x1e02, 0x1dd8,
  0x1dad, 0x1d83, 0x1d58, 0x1d2e, 0x1d04, 0x1cda, 0x1cb0, 0x1c86,
  0x1c5c, 0x1c33, 0x1c09, 0x1be0, 0x1bb6, 0x1b8d, 0x1b63, 0x1b3a,
  0x1b11, 0x1ae8, 0x1abf, 0x1a96, 0x1a6e, 0x1a45, 0x1a1d, 0x19f4,
  0x19cc, 0x19a3, 0x197b, 0x1953, 0x192b, 0x1903, 0x18db, 0x18b4,
  0x188c, 0x1865, 0x183d, 0x1816, 0x17ef, 0x17c7, 0x17a0, 0x1779,
  0x1753, 0x172c, 0x1705, 0x16df, 0x16b8, 0x1692, 0x166b, 0x1645,
  0x161f, 0x15f9, 0x15d3, 0x15ae, 0x1588, 0x1562, 0x153d, 0x1518,
  0x14f2, 0x14cd, 0x14a8, 0x1483, 0x145e, 0x143a, 0x1415, 0x13f1,
  0x13cc, 0x13a8, 0x1384, 0x1360, 0x133c, 0x1318, 0x12f4, 0x12d0,
  0x12ad, 0x1289, 0x1266, 0x1243, 0x1220, 0x11fd, 0x11da, 0x11b7,
  0x1194, 0x1172, 0x1150, 0x112d, 0x110b, 0x10e9, 0x10c7, 0x10a5,
  0x1083, 0x1062, 0x1040, 0x101f, 0x0ffd, 0x0fdc, 0x0fbb, 0x0f9a,
  0x0f79, 0x0f59, 0x0f38, 0x0f18, 0x0ef7, 0x0ed7, 0x0eb7, 0x0e97,
  0x0e77, 0x0e57, 0x0e38, 0x0e18, 0x0df9, 0x0dd9, 0x0dba, 0x0d9b,
  0x0d7c, 0x0d5d, 0x0d3f, 0x0d20, 0x0d02, 0x0ce3, 0x0cc5, 0x0ca7,
  0x0c89, 0x0c6b, 0x0c4e, 0x0c30, 0x0c13, 0x0bf5, 0x0bd8, 0x0bbb,
  0x0b9e, 0x0b81, 0x0b65, 0x0b48, 0x0b2c, 0x0b0f, 0x0af3, 0x0ad7,
  0x0abb, 0x0a9f, 0x0a84, 0x0a68, 0x0a4d, 0x0a31, 0x0a16, 0x09fb,
  0x09e0, 0x09c6, 0x09ab, 0x0991, 0x0976, 0x095c, 0x0942, 0x0928,
  0x090e, 0x08f4, 0x08db, 0x08c1, 0x08a8, 0x088f, 0x0876, 0x085d,
  0x0844, 0x082b, 0x0813, 0x07fb, 0x07e2, 0x07ca, 0x07b2, 0x079a,
  0x0783, 0x076b, 0x0754, 0x073c, 0x0725, 0x070e, 0x06f7, 0x06e1,
  0x06ca, 0x06b4, 0x069d, 0x0687, 0x0671, 0x065b, 0x0645, 0x0630,
  0x061a, 0x0605, 0x05f0, 0x05db, 0x05c6, 0x05b1, 0x059c, 0x0588,
  0x0573, 0x055f, 0x054b, 0x0537, 0x0523, 0x0510, 0x04fc, 0x04e9,
  0x04d6, 0x04c2, 0x04af, 0x049d, 0x048a, 0x0477, 0x0465, 0x0453,
  0x0441, 0x042f, 0x041d, 0x040b, 0x03fa, 0x03e8, 0x03d7, 0x03c6,
  0x03b5, 0x03a4, 0x0394, 0x0383, 0x0373, 0x0363, 0x0353, 0x0343,
  0x0333, 0x0323, 0x0314, 0x0305, 0x02f5, 0x02e6, 0x02d8, 0x02c9,
  0x02ba, 0x02ac, 0x029d, 0x028f, 0x0281, 0x0273, 0x0266, 0x0258,
  0x024b, 0x023e, 0x0230, 0x0223, 0x0217, 0x020a, 0x01fd, 0x01f1,
  0x01e5, 0x01d9, 0x01cd, 0x01c1, 0x01b6, 0x01aa, 0x019f, 0x0194,
  0x0189, 0x017e, 0x0173, 0x0168, 0x015e, 0x0154, 0x014a, 0x0140,
  0x0136, 0x012c, 0x0123, 0x0119, 0x0110, 0x0107, 0x00fe, 0x00f6,
  0x00ed, 0x00e4, 0x00dc, 0x00d4, 0x00cc, 0x00c4, 0x00bd, 0x00b5,
  0x00ae, 0x00a6, 0x009f, 0x0098, 0x0092, 0x008b, 0x0085, 0x007e,
  0x0078, 0x0072, 0x006c, 0x0067, 0x0061, 0x005c, 0x0056, 0x0051,
  0x004c, 0x0048, 0x0043, 0x003f, 0x003a, 0x0036, 0x0032, 0x002e,
  0x002b, 0x0027, 0x0024, 0x0020, 0x001d, 0x001a, 0x0018, 0x0015,
  0x0013, 0x0010, 0x000e, 0x000c, 0x000a, 0x0008, 0x0007, 0x0006,
  0x0004, 0x0003, 0x0002, 0x0002, 0x0001, 0x0000, 0x0000, 0x0000
};

Ipp16s AACI_HANN_short[] = { /* Q15 */
  0x0001, 0x000b, 0x001f, 0x003c, 0x0064, 0x0095, 0x00d0, 0x0115,
  0x0163, 0x01bb, 0x021d, 0x0288, 0x02fd, 0x037b, 0x0403, 0x0493,
  0x052d, 0x05d0, 0x067c, 0x0731, 0x07ee, 0x08b5, 0x0983, 0x0a5a,
  0x0b3a, 0x0c21, 0x0d11, 0x0e08, 0x0f07, 0x100e, 0x111c, 0x1231,
  0x134e, 0x1471, 0x159b, 0x16cb, 0x1802, 0x193f, 0x1a82, 0x1bcb,
  0x1d19, 0x1e6d, 0x1fc6, 0x2124, 0x2286, 0x23ed, 0x2559, 0x26c9,
  0x283c, 0x29b3, 0x2b2e, 0x2cac, 0x2e2c, 0x2fb0, 0x3136, 0x32be,
  0x3449, 0x35d5, 0x3763, 0x38f2, 0x3a82, 0x3c13, 0x3da4, 0x3f36,
  0x40c9, 0x425b, 0x43ec, 0x457d, 0x470d, 0x489c, 0x4a2a, 0x4bb6,
  0x4d41, 0x4ec9, 0x504f, 0x51d3, 0x5353, 0x54d1, 0x564c, 0x57c3,
  0x5936, 0x5aa6, 0x5c12, 0x5d79, 0x5edb, 0x6039, 0x6192, 0x62e6,
  0x6434, 0x657d, 0x66c0, 0x67fd, 0x6934, 0x6a64, 0x6b8e, 0x6cb1,
  0x6dce, 0x6ee3, 0x6ff1, 0x70f8, 0x71f7, 0x72ee, 0x73de, 0x74c5,
  0x75a5, 0x767c, 0x774a, 0x7811, 0x78ce, 0x7983, 0x7a2f, 0x7ad2,
  0x7b6c, 0x7bfc, 0x7c84, 0x7d02, 0x7d77, 0x7de2, 0x7e44, 0x7e9c,
  0x7eea, 0x7f2f, 0x7f6a, 0x7f9b, 0x7fc3, 0x7fe0, 0x7ff4, 0x7ffe,
  0x7ffe, 0x7ff4, 0x7fe0, 0x7fc3, 0x7f9b, 0x7f6a, 0x7f2f, 0x7eea,
  0x7e9c, 0x7e44, 0x7de2, 0x7d77, 0x7d02, 0x7c84, 0x7bfc, 0x7b6c,
  0x7ad2, 0x7a2f, 0x7983, 0x78ce, 0x7811, 0x774a, 0x767c, 0x75a5,
  0x74c5, 0x73de, 0x72ee, 0x71f7, 0x70f8, 0x6ff1, 0x6ee3, 0x6dce,
  0x6cb1, 0x6b8e, 0x6a64, 0x6934, 0x67fd, 0x66c0, 0x657d, 0x6434,
  0x62e6, 0x6192, 0x6039, 0x5edb, 0x5d79, 0x5c12, 0x5aa6, 0x5936,
  0x57c3, 0x564c, 0x54d1, 0x5353, 0x51d3, 0x504f, 0x4ec9, 0x4d41,
  0x4bb6, 0x4a2a, 0x489c, 0x470d, 0x457d, 0x43ec, 0x425b, 0x40c9,
  0x3f36, 0x3da4, 0x3c13, 0x3a82, 0x38f2, 0x3763, 0x35d5, 0x3449,
  0x32be, 0x3136, 0x2fb0, 0x2e2c, 0x2cac, 0x2b2e, 0x29b3, 0x283c,
  0x26c9, 0x2559, 0x23ed, 0x2286, 0x2124, 0x1fc6, 0x1e6d, 0x1d19,
  0x1bcb, 0x1a82, 0x193f, 0x1802, 0x16cb, 0x159b, 0x1471, 0x134e,
  0x1231, 0x111c, 0x100e, 0x0f07, 0x0e08, 0x0d11, 0x0c21, 0x0b3a,
  0x0a5a, 0x0983, 0x08b5, 0x07ee, 0x0731, 0x067c, 0x05d0, 0x052d,
  0x0493, 0x0403, 0x037b, 0x02fd, 0x0288, 0x021d, 0x01bb, 0x0163,
  0x0115, 0x00d0, 0x0095, 0x0064, 0x003c, 0x001f, 0x000b, 0x0001
};

/* freq = 96000 (Q30) */
AACp2sb aacienc_p2sb_l_0[] = {
  { 0,  3, 1073741824, 1073741824}, { 4,  7, 1073741824, 1073741824},
  { 8, 11, 1073741824, 1073741824}, {12, 15, 1073741824, 1073741824},
  {16, 19, 1073741824,  536870912}, {19, 21,  536870912,  536870912},
  {21, 23,  536870912,  536870912}, {23, 25,  536870912,  536870912},
  {25, 27,  536870912,  536870912}, {27, 29,  536870912,  536870912},
  {29, 30,  536870912, 1073741824}, {31, 32, 1073741824,  357556027},
  {32, 33,  716185797,  716185797}, {33, 34,  357556027, 1073741824},
  {35, 36, 1073741824, 1073741824}, {37, 38, 1073741824,  858993459},
  {38, 40,  214748365,  429496730}, {40, 41,  644245094,  894426939},
  {41, 43,  179314885,  153545081}, {43, 44,  920196743,  920196743},
  {44, 46,  153545081,  402653184}, {46, 47,  671088640,  835371139},
  {47, 48,  238370685, 1073741824}, {49, 50, 1073741824,  195421012},
  {50, 51,  878320812,  625991483}, {51, 52,  447750341,  908385583},
  {52, 54,  165356241,  572304392}, {54, 56,  501437432,  298500227},
  {56, 58,  775241597,  204010947}, {58, 60,  869730877,  123480310},
  {60, 62,  950261514,  347892351}, {62, 64,  725849473,   47244640},
  {64, 65, 1026497184,  425201762}, {65, 66,  648540062,  536870912},
  {66, 67,  536870912,  440234148}, {67, 68,  633507676,  197568496},
  {68, 68,  701153411,          0}, {68, 69,  175019917,  405874409},
  {69, 69,  541165879,          0}, {69, 70,  126701535,  466003952},
  {70, 70,  607737872,          0},
};

/* freq = 88200 (Q30) */
AACp2sb aacienc_p2sb_l_1[] = {
  { 0,  3, 1073741824, 1073741824}, { 4,  7, 1073741824, 1073741824},
  { 8, 11, 1073741824, 1073741824}, {12, 15, 1073741824, 1073741824},
  {16, 18, 1073741824, 1073741824}, {19, 20, 1073741824, 1073741824},
  {21, 22, 1073741824, 1073741824}, {23, 24, 1073741824, 1073741824},
  {25, 26, 1073741824, 1073741824}, {27, 28, 1073741824, 1073741824},
  {29, 30, 1073741824,  357556027}, {30, 31,  716185797,  716185797},
  {31, 32,  357556027, 1073741824}, {33, 34, 1073741824,  268435456},
  {34, 36,  805306368,  268435456}, {36, 38,  805306368,  214748365},
  {38, 39,  858993459,  858993459}, {39, 41,  214748365,  357556027},
  {41, 42,  716185797,  716185797}, {42, 44,  357556027,  460635242},
  {44, 45,  613106582, 1073741824}, {46, 47, 1073741824,  476741370},
  {47, 48,  597000454,  751619277}, {48, 49,  322122547,  966367642},
  {49, 51,  107374182,  357556027}, {51, 52,  716185797,  660351222},
  {52, 54,  413390602,  357556027}, {54, 56,  716185797,  119185342},
  {56, 58,  954556482,   51539608}, {58, 60, 1022202216,   40802189},
  {60, 62, 1032939635,  335007449}, {62, 64,  738734375,  127775277},
  {64, 65,  945966547,  591631745}, {65, 66,  482110079,  777389081},
  {66, 67,  296352743,  747324310}, {67, 68,  326417514,  543313363},
  {68, 69,  530428461,  223338299}, {69, 69,  648540062,          0},
  {69, 70,  202937205,  344671126}, {70, 70,  501437432,          0},
  {70, 71,  227633267, 1073741824},
};

/* freq = 64000 (Q30) */
AACp2sb aacienc_p2sb_l_2[] = {
  { 0,  1, 1073741824, 1073741824}, { 2,  3, 1073741824, 1073741824},
  { 4,  5, 1073741824, 1073741824}, { 6,  7, 1073741824, 1073741824},
  { 8,  9, 1073741824, 1073741824}, {10, 11, 1073741824, 1073741824},
  {12, 13, 1073741824, 1073741824}, {14, 15, 1073741824, 1073741824},
  {16, 17, 1073741824, 1073741824}, {18, 19, 1073741824, 1073741824},
  {20, 21, 1073741824,  716185797}, {21, 22,  357556027, 1073741824},
  {23, 24, 1073741824,  357556027}, {24, 25,  716185797,  716185797},
  {25, 27,  357556027, 1073741824}, {28, 29, 1073741824, 1073741824},
  {30, 31, 1073741824,  858993459}, {31, 33,  214748365,  429496730},
  {33, 35,  644245094,  536870912}, {35, 37,  536870912,  307090162},
  {37, 38,  766651662,  939524096}, {38, 40,  134217728,  835371139},
  {40, 42,  238370685,  429496730}, {42, 43,  644245094,  976031318},
  {43, 45,   97710506,  577673101}, {45, 47,  496068723,  286689067},
  {47, 48,  787052757,  871878361}, {48, 50,  201863463,  476741370},
  {50, 52,  597000454,  307090162}, {52, 54,  766651662,   85899346},
  {54, 55,  987842478,  651761287}, {55, 56,  421980537, 1038308344},
  {56, 58,   35433480,  144955146}, {58, 59,  928786678,  204010947},
  {59, 60,  869730877,  137438953}, {60, 60,  913754292,          0},
  {60, 61,   22548578,  775241597}, {61, 62,  298500227,  426275504},
  {62, 63,  647466320,   28991029}, {63, 63,  588410520,          0},
  {63, 64,  456340275,  110595408}, {64, 64,  493921239,          0},
  {64, 65,  469225177,   20401095}, {65, 65,  409095635,          0},
  {65, 65,  409095635,          0}, {65, 66,  235149459,  319975064},
  {66, 66,  753766760,          0},
};

/* freq = 48000 (Q30) */
AACp2sb aacienc_p2sb_l_3[] = {
  { 0,  1, 1073741824, 1073741824}, { 2,  3, 1073741824, 1073741824},
  { 4,  5, 1073741824, 1073741824}, { 6,  7, 1073741824, 1073741824},
  { 8,  9, 1073741824, 1073741824}, {10, 11, 1073741824, 1073741824},
  {12, 13, 1073741824, 1073741824}, {14, 15, 1073741824, 1073741824},
  {16, 17, 1073741824, 1073741824}, {18, 19, 1073741824,  716185797},
  {19, 22,  357556027,  357556027}, {22, 24,  716185797, 1073741824},
  {25, 27, 1073741824,  536870912}, {27, 29,  536870912,  536870912},
  {29, 31,  536870912,  536870912}, {31, 33,  536870912,  214748365},
  {33, 34,  858993459,  858993459}, {34, 36,  214748365,  894426939},
  {36, 38,  179314885,  613106582}, {38, 40,  460635242,  134217728},
  {40, 41,  939524096,  597000454}, {41, 43,  476741370,  214748365},
  {43, 44,  858993459,  780610306}, {44, 46,  293131518,  413390602},
  {46, 47,  660351222,  920196743}, {47, 49,  153545081,  470298919},
  {49, 50,  603442905,  947040289}, {50, 52,  126701535,  429496730},
  {52, 53,  644245094,  818191270}, {53, 55,  255550554,  179314885},
  {55, 56,  894426939,  496068723}, {56, 57,  577673101,  690415993},
  {57, 58,  383325831,  762356695}, {58, 59,  311385129,  725849473},
  {59, 60,  347892351,  609885356}, {60, 61,  463856468,  429496730},
  {61, 62,  644245094,  191126045}, {62, 62,  763430437,          0},
  {62, 63,  119185342,  579820585}, {63, 64,  493921239,  172872434},
  {64, 64,  613106582,          0}, {64, 65,  287762809,  289910292},
  {65, 65,  545460847,          0}, {65, 66,  238370685,  268435456},
  {66, 66,  476741370,          0}, {66, 67,  328564998,  127775277},
  {67, 67,  409095635,          0}, {67, 67,  409095635,          0},
  {67, 68,  127775277, 1073741824},
};

/* freq = 44100 (Q30) */
AACp2sb aacienc_p2sb_l_4[] = {
  { 0,  1, 1073741824, 1073741824}, { 2,  3, 1073741824, 1073741824},
  { 4,  5, 1073741824, 1073741824}, { 6,  7, 1073741824, 1073741824},
  { 8,  9, 1073741824, 1073741824}, {10, 11, 1073741824, 1073741824},
  {12, 13, 1073741824, 1073741824}, {14, 15, 1073741824, 1073741824},
  {16, 17, 1073741824, 1073741824}, {18, 19, 1073741824,  357556027},
  {19, 21,  716185797, 1073741824}, {22, 24, 1073741824,  716185797},
  {24, 27,  357556027,  268435456}, {27, 29,  805306368,  268435456},
  {29, 31,  805306368,  268435456}, {31, 32,  805306368, 1073741824},
  {33, 34, 1073741824,  644245094}, {34, 36,  429496730,  716185797},
  {36, 38,  357556027,  460635242}, {38, 39,  613106582, 1073741824},
  {40, 41, 1073741824,  476741370}, {41, 43,  597000454,  214748365},
  {43, 44,  858993459,  780610306}, {44, 46,  293131518,  413390602},
  {46, 47,  660351222,  920196743}, {47, 49,  153545081,  470298919},
  {49, 50,  603442905,  947040289}, {50, 52,  126701535,  429496730},
  {52, 53,  644245094,  818191270}, {53, 55,  255550554,  179314885},
  {55, 56,  894426939,  496068723}, {56, 57,  577673101,  690415993},
  {57, 58,  383325831,  787052757}, {58, 59,  286689067,  780610306},
  {59, 60,  293131518,  686121026}, {60, 61,  387620798,  522912268},
  {61, 62,  550829556,  299573969}, {62, 63,  774167855,   22548578},
  {63, 63,  731218182,          0}, {63, 64,  319975064,  365072220},
  {64, 64,  648540062,          0}, {64, 65,   61203284,  528280977},
  {65, 66,  545460847,   32212255}, {66, 66,  513248592,          0},
  {66, 66,  513248592,          0}, {66, 67,   16106127,  438086664},
  {67, 67,  452045308,          0}, {67, 68,  183609852,  231928234},
  {68, 69,  841813590, 1073741824},
};

/* freq = 32000 (Q30) */
AACp2sb aacienc_p2sb_l_5[] = {
  { 0,  1, 1073741824,  357556027}, { 1,  2,  716185797,  716185797},
  { 2,  3,  357556027, 1073741824}, { 4,  5, 1073741824,  357556027},
  { 5,  6,  716185797,  716185797}, { 6,  7,  357556027, 1073741824},
  { 8,  9, 1073741824,  357556027}, { 9, 10,  716185797,  716185797},
  {10, 11,  357556027, 1073741824}, {12, 13, 1073741824,  357556027},
  {13, 15,  716185797, 1073741824}, {16, 18, 1073741824,  716185797},
  {18, 20,  357556027,  805306368}, {20, 22,  268435456,  805306368},
  {22, 24,  268435456,  805306368}, {24, 26,  268435456,  644245094},
  {26, 28,  429496730,  214748365}, {28, 30,  858993459,  536870912},
  {30, 32,  536870912,  536870912}, {32, 34,  536870912,  307090162},
  {34, 35,  766651662,  939524096}, {35, 37,  134217728,  835371139},
  {37, 39,  238370685,  429496730}, {39, 41,  644245094,  268435456},
  {41, 42,  805306368,  908385583}, {42, 44,  165356241,  572304392},
  {44, 46,  501437432,   63350768}, {46, 47, 1010391056,  678604833},
  {47, 49,  395136991,   48318382}, {49, 50, 1025423442,  513248592},
  {50, 51,  560493232,  858993459}, {51, 52,  214748365, 1073741824},
  {53, 54, 1073741824,  104152957}, {54, 55,  969588867,  129922761},
  {55, 56,  943819063,   92341797}, {56, 56,  981400027,          0},
  {57, 57,  904090616,          0}, {57, 58,  169651208,  680752316},
  {58, 59,  392989508,  405874409}, {59, 60,  667867415,   89120571},
  {60, 60,  716185797,          0}, {60, 61,  268435456,  404800668},
  {61, 61,  648540062,          0}, {61, 62,   20401095,  573378134},
  {62, 63,  500363690,   83751862}, {63, 63,  536870912,          0},
  {63, 64,  453119050,   75161928}, {64, 64,  484257563,          0},
  {64, 64,  484257563,          0}, {64, 65,   30064771,  519691043},
  {65, 65,  554050781,          0},
};

/* freq = 24000 (Q30) */
AACp2sb aacienc_p2sb_l_6[] = {
  { 0,  1, 1073741824,  357556027}, { 1,  2,  716185797,  716185797},
  { 2,  3,  357556027, 1073741824}, { 4,  5, 1073741824,  357556027},
  { 5,  6,  716185797,  716185797}, { 6,  7,  357556027, 1073741824},
  { 8,  9, 1073741824,  357556027}, { 9, 10,  716185797,  716185797},
  {10, 11,  357556027,  805306368}, {11, 12,  268435456,  805306368},
  {12, 13,  268435456,  805306368}, {13, 15,  268435456,  805306368},
  {15, 17,  268435456,  805306368}, {17, 19,  268435456,  805306368},
  {19, 21,  268435456,  805306368}, {21, 23,  268435456,  429496730},
  {23, 24,  644245094, 1073741824}, {25, 26, 1073741824,  644245094},
  {26, 27,  429496730, 1073741824}, {28, 29, 1073741824,  357556027},
  {29, 30,  716185797,  716185797}, {30, 32,  357556027,  460635242},
  {32, 34,  613106582,  134217728}, {34, 35,  939524096,  671088640},
  {35, 36,  402653184, 1073741824}, {37, 38, 1073741824,  751619277},
  {38, 40,  322122547,  179314885}, {40, 41,  894426939,  536870912},
  {41, 43,  536870912,   76235670}, {43, 44,  997506154,  501437432},
  {44, 45,  572304392, 1010391056}, {45, 47,   63350768,  282394100},
  {47, 48,  791347724,  716185797}, {48, 49,  357556027, 1025423442},
  {49, 51,   48318382,  288836551}, {51, 52,  784905273,  651761287},
  {52, 53,  421980537,  894426939}, {53, 55,  179314885,   94489281},
  {55, 56,  979252543,  376883380}, {56, 57,  696858444,  660351222},
  {57, 58,  413390602,  945966547}, {58, 60,  127775277,   44023415},
  {60, 61, 1029718409,  344671126}, {61, 62,  729070698,  527207236},
  {62, 63,  546534588,  606664131}, {63, 64,  467077693,  592705487},
  {64, 65,  481036337, 1073741824},
};

/* freq = 22050 (Q30) */
AACp2sb aacienc_p2sb_l_7[] = {
  { 0,  0, 1073741824,          0}, { 1,  1, 1073741824,          0},
  { 2,  2, 1073741824,          0}, { 3,  3, 1073741824,          0},
  { 4,  4, 1073741824,          0}, { 5,  5, 1073741824,          0},
  { 6,  6, 1073741824,          0}, { 7,  7, 1073741824,          0},
  { 8,  8, 1073741824,          0}, { 9,  9, 1073741824,          0},
  {10, 10, 1073741824,          0}, {11, 12, 1073741824, 1073741824},
  {13, 14, 1073741824, 1073741824}, {15, 16, 1073741824, 1073741824},
  {17, 18, 1073741824,  858993459}, {18, 20,  214748365,  429496730},
  {20, 21,  644245094, 1073741824}, {22, 23, 1073741824,  644245094},
  {23, 24,  429496730, 1073741824}, {25, 26, 1073741824,  357556027},
  {26, 27,  716185797,  716185797}, {27, 29,  357556027,  460635242},
  {29, 31,  613106582,  134217728}, {31, 32,  939524096,  671088640},
  {32, 33,  402653184, 1073741824}, {34, 35, 1073741824,  751619277},
  {35, 37,  322122547,  293131518}, {37, 38,  780610306,  716185797},
  {38, 40,  357556027,  229780750}, {40, 41,  843961074,  644245094},
  {41, 43,  429496730,  126701535}, {43, 44,  947040289,  508953625},
  {44, 45,  564788199,  966367642}, {45, 47,  107374182,  186831077},
  {47, 48,  886910747,  558345748}, {48, 49,  515396076,  954556482},
  {49, 51,  119185342,  138512695}, {51, 52,  935229129,  423054279},
  {52, 53,  650687545,  716185797}, {53, 54,  357556027, 1016833507},
  {54, 56,   56908317,  220117074}, {56, 57,  853624750,  388694540},
  {57, 58,  685047284,  716185797}, {58, 59,  357556027,  918049260},
  {59, 60,  155692564, 1018980991}, {60, 61,   54760833, 1023275958},
  {61, 62,   50465866, 1073741824},
};

/* freq = 16000 (Q30) */
AACp2sb aacienc_p2sb_l_8[] = {
  { 0,  1, 1073741824,  644245094}, { 1,  3,  429496730,  214748365},
  { 3,  4,  858993459,  858993459}, { 4,  6,  214748365,  429496730},
  { 6,  7,  644245094, 1073741824}, { 8,  9, 1073741824,  644245094},
  { 9, 11,  429496730,  214748365}, {11, 12,  858993459,  858993459},
  {12, 14,  214748365,  429496730}, {14, 15,  644245094,  894426939},
  {15, 17,  179314885,  179314885}, {17, 19,  894426939,  179314885},
  {19, 21,  894426939,  179314885}, {21, 22,  894426939, 1073741824},
  {23, 24, 1073741824,  766651662}, {24, 26,  307090162,  402653184},
  {26, 27,  671088640,  939524096}, {27, 29,  134217728,  357556027},
  {29, 30,  716185797,  716185797}, {30, 31,  357556027,  966367642},
  {31, 33,  107374182,  488552530}, {33, 34,  585189294,  976031318},
  {34, 36,   97710506,  248034361}, {36, 37,  825707463,  460635242},
  {37, 38,  613106582,  858993459}, {38, 40,  214748365,   63350768},
  {40, 41, 1010391056,  238370685}, {41, 42,  835371139,  564788199},
  {42, 43,  508953625,  766651662}, {43, 44,  307090162, 1073741824},
  {45, 46, 1073741824,  165356241}, {46, 47,  908385583,  383325831},
  {47, 48,  690415993,  644245094}, {48, 49,  429496730,  910533067},
  {49, 50,  163208757, 1073741824}, {51, 52, 1073741824,  156766306},
  {52, 53,  916975518,  316753838}, {53, 54,  756987986,  479962595},
  {54, 55,  593779229,  644245094}, {55, 56,  429496730,  795642692},
  {56, 57,  278099132,  925565452}, {57, 58,  148176372,  969588867},
  {58, 59,  104152957, 1073741824},
};

/* freq = 12000 (Q30) */
AACp2sb aacienc_p2sb_l_9[] = {
  { 0,  1, 1073741824,  357556027}, { 1,  2,  716185797,  716185797},
  { 2,  3,  357556027, 1073741824}, { 4,  5, 1073741824,  357556027},
  { 5,  6,  716185797,  716185797}, { 6,  7,  357556027, 1073741824},
  { 8,  9, 1073741824,  357556027}, { 9, 10,  716185797,  716185797},
  {10, 11,  357556027,  920196743}, {11, 12,  153545081, 1073741824},
  {13, 14, 1073741824,  153545081}, {14, 15,  920196743,  920196743},
  {15, 17,  153545081,  613106582}, {17, 19,  460635242,  134217728},
  {19, 20,  939524096,  671088640}, {20, 22,  402653184,  134217728},
  {22, 23,  939524096,  597000454}, {23, 24,  476741370,  954556482},
  {24, 26,  119185342,  214748365}, {26, 27,  858993459,  429496730},
  {27, 28,  644245094,  976031318}, {28, 30,   97710506,  357556027},
  {30, 31,  716185797,  716185797}, {31, 32,  357556027,  991063704},
  {32, 34,   82678120,  460635242}, {34, 35,  613106582,  858993459},
  {35, 37,  214748365,   63350768}, {37, 38, 1010391056,  476741370},
  {38, 39,  597000454,  791347724}, {39, 41,  282394100,  146028888},
  {41, 42,  927712936,  419833053}, {42, 43,  653908771,  773094113},
  {43, 45,  300647711,   74088186}, {45, 46,  999653638,  449897824},
  {46, 47,  623844000,  694710960}, {47, 48,  379030864,  954556482},
  {48, 50,  119185342,  127775277}, {50, 51,  945966547,  357556027},
  {51, 52,  716185797,  570156909}, {52, 53,  503584915,  749471793},
  {53, 54,  324270031,  904090616}, {54, 55,  169651208,  968515125},
  {55, 56,  105226699, 1073741824},
};

/* freq = 11025 (Q30) */
AACp2sb aacienc_p2sb_l_10[] = {
  { 0,  1, 1073741824,  153545081}, { 1,  2,  920196743,  307090162},
  { 2,  3,  766651662,  460635242}, { 3,  4,  613106582,  613106582},
  { 4,  5,  460635242,  766651662}, { 5,  6,  307090162,  920196743},
  { 6,  7,  153545081, 1073741824}, { 8,  9, 1073741824,  153545081},
  { 9, 10,  920196743,  307090162}, {10, 11,  766651662,  460635242},
  {11, 12,  613106582,  613106582}, {12, 14,  460635242,  268435456},
  {14, 15,  805306368,  805306368}, {15, 17,  268435456,  268435456},
  {17, 18,  805306368,  805306368}, {18, 20,  268435456,  119185342},
  {20, 21,  954556482,  476741370}, {21, 22,  597000454,  835371139},
  {22, 23,  238370685, 1073741824}, {24, 25, 1073741824,  214748365},
  {25, 26,  858993459,  780610306}, {26, 28,  293131518,  179314885},
  {28, 29,  894426939,  536870912}, {29, 30,  536870912,  825707463},
  {30, 32,  248034361,  307090162}, {32, 33,  766651662,  716185797},
  {33, 34,  357556027, 1007169831}, {34, 36,   66571993,  357556027},
  {36, 37,  716185797,  678604833}, {37, 39,  395136991,   51539608},
  {39, 40, 1022202216,  373662155}, {40, 41,  700079669,  760209211},
  {41, 43,  313532613,  114890375}, {43, 44,  958851449,  536870912},
  {44, 45,  536870912,  813896303}, {45, 47,  259845521,   27917287},
  {47, 48, 1045824537,  287762809}, {48, 49,  785979015,  536870912},
  {49, 50,  536870912,  760209211}, {50, 51,  313532613,  968515125},
  {51, 53,  105226699,   73014444}, {53, 54, 1000727380,  151397597},
  {54, 55,  922344227, 1073741824},
};

/* freq = 8000 (Q30) */
AACp2sb aacienc_p2sb_l_11[] = {
  { 0,  1, 1073741824,  357556027}, { 1,  2,  716185797,  716185797},
  { 2,  3,  357556027, 1073741824}, { 4,  5, 1073741824,  357556027},
  { 5,  6,  716185797,  716185797}, { 6,  7,  357556027, 1073741824},
  { 8,  9, 1073741824,  357556027}, { 9, 10,  716185797,  716185797},
  {10, 11,  357556027,  966367642}, {11, 13,  107374182,  107374182},
  {13, 14,  966367642,  322122547}, {14, 15,  751619277,  536870912},
  {15, 16,  536870912,  682899800}, {16, 18,  390842024,   97710506},
  {18, 19,  976031318,  585189294}, {19, 20,  488552530,  984621253},
  {20, 22,   89120571,  268435456}, {22, 23,  805306368,  577673101},
  {23, 24,  496068723,  825707463}, {24, 25,  248034361,  997506154},
  {25, 27,   76235670,  357556027}, {27, 28,  716185797,  716185797},
  {28, 29,  357556027, 1007169831}, {29, 31,   66571993,  119185342},
  {31, 32,  954556482,  476741370}, {32, 33,  597000454,  791347724},
  {33, 34,  282394100, 1020054733}, {34, 36,   53687091,  280246616},
  {36, 37,  793495208,  491773755}, {37, 38,  581968069,  784905273},
  {38, 40,  288836551,   74088186}, {40, 41,  999653638,  311385129},
  {41, 42,  762356695,  585189294}, {42, 43,  488552530,  865435910},
  {43, 45,  208305914,   78383153}, {45, 46,  995358671,  341449900},
  {46, 47,  732291924,  581968069}, {47, 48,  491773755,  784905273},
  {48, 49,  288836551,  958851449}, {49, 51,  114890375, 1073741824},
};

AACp2sb *aacienc_p2sb_l[] = {
    aacienc_p2sb_l_0, aacienc_p2sb_l_1, aacienc_p2sb_l_2,
    aacienc_p2sb_l_3, aacienc_p2sb_l_4, aacienc_p2sb_l_5,
    aacienc_p2sb_l_6, aacienc_p2sb_l_7, aacienc_p2sb_l_8,
    aacienc_p2sb_l_9, aacienc_p2sb_l_10, aacienc_p2sb_l_11
};

/* freq = 96000 (Q30) */
AACp2sb aacienc_p2sb_s_0[] = {
  { 0,  3, 1073741824, 1073741824}, { 4,  7, 1073741824, 1073741824},
  { 8, 11, 1073741824, 1073741824}, {12, 15, 1073741824,  536870912},
  {15, 17,  536870912,  536870912}, {17, 19,  536870912,  536870912},
  {19, 22,  536870912, 1073741824}, {23, 25, 1073741824,  536870912},
  {25, 27,  536870912,  429496730}, {27, 30,  644245094,  307090162},
  {30, 33,  766651662,  229780750}, {33, 35,  843961074, 1073741824}
};

/* freq = 88200 (Q30) */
AACp2sb aacienc_p2sb_s_1[] = {
  { 0,  3, 1073741824, 1073741824}, { 4,  7, 1073741824, 1073741824},
  { 8, 11, 1073741824, 1073741824}, {12, 15, 1073741824, 1073741824},
  {16, 17, 1073741824, 1073741824}, {18, 19, 1073741824, 1073741824},
  {20, 23, 1073741824,  716185797}, {23, 26,  357556027,  268435456},
  {26, 28,  805306368,  214748365}, {28, 31,  858993459,  153545081},
  {31, 34,  920196743,  357556027}, {34, 36,  716185797, 1073741824}
};

/* freq = 64000 (Q30) */
AACp2sb aacienc_p2sb_s_2[] = {
  { 0,  3, 1073741824, 1073741824}, { 4,  7, 1073741824, 1073741824},
  { 8, 11, 1073741824, 1073741824}, {12, 15, 1073741824, 1073741824},
  {16, 17, 1073741824, 1073741824}, {18, 19, 1073741824, 1073741824},
  {20, 23, 1073741824,  716185797}, {23, 26,  357556027,  357556027},
  {26, 28,  716185797,  536870912}, {28, 31,  536870912, 1073741824},
  {32, 35, 1073741824,  835371139}, {35, 38,  238370685, 1073741824}
};

/* freq = 48000 (Q30) */
AACp2sb aacienc_p2sb_s_3[] = {
  { 0,  3, 1073741824, 1073741824}, { 4,  7, 1073741824, 1073741824},
  { 8, 11, 1073741824, 1073741824}, {12, 15, 1073741824, 1073741824},
  {16, 18, 1073741824,  536870912}, {18, 22,  536870912,  536870912},
  {22, 25,  536870912,  716185797}, {25, 28,  357556027,  357556027},
  {28, 31,  716185797,  536870912}, {31, 33,  536870912, 1073741824},
  {34, 35, 1073741824, 1073741824}, {36, 38, 1073741824,  119185342},
  {38, 39,  954556482,  858993459}, {39, 41,  214748365, 1073741824}
};

/* freq = 44100 (Q30) */
AACp2sb aacienc_p2sb_s_4[] = {
  { 0,  3, 1073741824, 1073741824}, { 4,  7, 1073741824, 1073741824},
  { 8, 11, 1073741824, 1073741824}, {12, 15, 1073741824, 1073741824},
  {16, 18, 1073741824, 1073741824}, {19, 22, 1073741824, 1073741824},
  {23, 26, 1073741824,  357556027}, {26, 28,  716185797, 1073741824},
  {29, 31, 1073741824, 1073741824}, {32, 34, 1073741824,  644245094},
  {34, 36,  429496730,  716185797}, {36, 38,  357556027,  939524096},
  {38, 40,  134217728,  644245094}, {40, 41,  429496730, 1073741824}
};

/* freq = 32000 (Q30) */
AACp2sb aacienc_p2sb_s_5[] = {
  { 0,  3, 1073741824, 1073741824}, { 4,  7, 1073741824, 1073741824},
  { 8, 11, 1073741824, 1073741824}, {12, 15, 1073741824, 1073741824},
  {16, 19, 1073741824,  536870912}, {19, 23,  536870912,  536870912},
  {23, 26,  536870912, 1073741824}, {27, 29, 1073741824,  716185797},
  {29, 32,  357556027,  805306368}, {32, 35,  268435456,  429496730},
  {35, 37,  644245094,  716185797}, {37, 40,  357556027,  134217728},
  {40, 42,  939524096,  119185342}, {42, 43,  954556482, 1073741824}
};

/* freq = 24000 (Q30) */
AACp2sb aacienc_p2sb_s_6[] = {
  { 0,  3, 1073741824, 1073741824}, { 4,  7, 1073741824, 1073741824},
  { 8, 11, 1073741824, 1073741824}, {12, 15, 1073741824, 1073741824},
  {16, 19, 1073741824, 1073741824}, {20, 21, 1073741824, 1073741824},
  {22, 23, 1073741824, 1073741824}, {24, 27, 1073741824,  716185797},
  {27, 30,  357556027,  357556027}, {30, 32,  716185797,  805306368},
  {32, 35,  268435456,  644245094}, {35, 37,  429496730, 1073741824},
  {38, 40, 1073741824,  613106582}, {40, 42,  460635242,  805306368},
  {42, 45,  268435456, 1073741824}
};

/* freq = 22050 (Q30) */
AACp2sb aacienc_p2sb_s_7[] = {
  { 0,  3, 1073741824, 1073741824}, { 4,  7, 1073741824, 1073741824},
  { 8, 11, 1073741824, 1073741824}, {12, 15, 1073741824, 1073741824},
  {16, 19, 1073741824, 1073741824}, {20, 21, 1073741824, 1073741824},
  {22, 23, 1073741824, 1073741824}, {24, 27, 1073741824, 1073741824},
  {28, 30, 1073741824,  716185797}, {30, 32,  357556027, 1073741824},
  {33, 35, 1073741824, 1073741824}, {36, 38, 1073741824,  429496730},
  {38, 41,  644245094,  153545081}, {41, 43,  920196743,  402653184},
  {43, 45,  671088640, 1073741824}
};

/* freq = 16000 (Q30) */
AACp2sb aacienc_p2sb_s_8[] = {
  { 0,  3, 1073741824, 1073741824}, { 4,  7, 1073741824, 1073741824},
  { 8, 11, 1073741824, 1073741824}, {12, 15, 1073741824, 1073741824},
  {16, 19, 1073741824, 1073741824}, {20, 22, 1073741824,  536870912},
  {22, 24,  536870912,  536870912}, {24, 26,  536870912,  536870912},
  {26, 29,  536870912, 1073741824}, {30, 32, 1073741824,  716185797},
  {32, 35,  357556027, 1073741824}, {36, 38, 1073741824,  644245094},
  {38, 41,  429496730,  536870912}, {41, 44,  536870912,  402653184},
  {44, 46,  671088640, 1073741824}
};

/* freq = 12000 (Q30) */
AACp2sb aacienc_p2sb_s_9[] = {
  { 0,  3, 1073741824, 1073741824}, { 4,  7, 1073741824, 1073741824},
  { 8, 11, 1073741824, 1073741824}, {12, 15, 1073741824, 1073741824},
  {16, 19, 1073741824,  536870912}, {19, 21,  536870912,  536870912},
  {21, 23,  536870912,  536870912}, {23, 25,  536870912,  536870912},
  {25, 29,  536870912,  536870912}, {29, 32,  536870912,  357556027},
  {32, 35,  716185797, 1073741824}, {36, 38, 1073741824,  858993459},
  {38, 41,  214748365,  894426939}, {41, 44,  179314885,  920196743},
  {44, 47,  153545081, 1073741824}
};

/* freq = 11025 (Q30) */
AACp2sb aacienc_p2sb_s_10[] = {
  { 0,  3, 1073741824, 1073741824}, { 4,  7, 1073741824, 1073741824},
  { 8, 11, 1073741824, 1073741824}, {12, 15, 1073741824, 1073741824},
  {16, 18, 1073741824, 1073741824}, {19, 20, 1073741824, 1073741824},
  {21, 22, 1073741824, 1073741824}, {23, 24, 1073741824, 1073741824},
  {25, 28, 1073741824, 1073741824}, {29, 31, 1073741824,  716185797},
  {31, 35,  357556027,  268435456}, {35, 38,  805306368,  214748365},
  {38, 41,  858993459,  357556027}, {41, 44,  716185797,  460635242},
  {44, 46,  613106582, 1073741824}
};

/* freq = 8000 (Q30) */
AACp2sb aacienc_p2sb_s_11[] = {
  { 0,  1, 1073741824, 1073741824}, { 2,  3, 1073741824, 1073741824},
  { 4,  5, 1073741824, 1073741824}, { 6,  7, 1073741824, 1073741824},
  { 8,  9, 1073741824, 1073741824}, {10, 11, 1073741824, 1073741824},
  {12, 13, 1073741824, 1073741824}, {14, 17, 1073741824, 1073741824},
  {18, 21, 1073741824,  716185797}, {21, 24,  357556027,  357556027},
  {24, 26,  716185797, 1073741824}, {27, 29, 1073741824, 1073741824},
  {30, 33, 1073741824,  429496730}, {33, 36,  644245094,  766651662},
  {36, 39,  307090162, 1073741824}
};

AACp2sb *aacienc_p2sb_s[] = {
  aacienc_p2sb_s_0, aacienc_p2sb_s_1, aacienc_p2sb_s_2,
  aacienc_p2sb_s_3, aacienc_p2sb_s_4, aacienc_p2sb_s_5,
  aacienc_p2sb_s_6, aacienc_p2sb_s_7, aacienc_p2sb_s_8,
  aacienc_p2sb_s_9, aacienc_p2sb_s_10, aacienc_p2sb_s_11
};

#endif //UMC_ENABLE_AAC_INT_AUDIO_ENCODER

